- Tham gia
- 28/02/2015
- Bài viết
- 16,829
- Được Like
- 12,687
Information - Thông tin 1.2
Mô tả: Tạo ra một tab menu hệ thống thông tin.
Tab Information
Tính năng:
Chỉnh sửa template andy_information.
Chỉnh sửa template andy_information_quick_links.
Làm thế nào để thêm tùy chọn sub-menu:
1. Chỉnh sửa file library/Andy/Information/Information.php và thêm mã "public function actionExample()".
2. Mã actionExample sẽ là liên kết được gọi như thế này:
3. Bạn cũng sẽ cần phải tạo ra template andy_example.
Chúc các bạn thành công.
Mô tả: Tạo ra một tab menu hệ thống thông tin.
Tab Information
- Tab nổi bật khi lựa chọn.
- Tab có nút Quick Links thả xuống.
- Các mục menu được hiển thị trong thanh sub-menu.
- Breadcrumb cho thấy đường dẫn hiện tại.
- Khả năng để thêm sub-menu.
- Template hệ thống đơn giản.
- Download information_v1.2.zip ở đính kèm và giải nén ra.
- Upload folder "library" lên host ngang hàng file index.php.
- Vào Admin Control Panel, đến trang "Install Add-on".
- Upload file addon-Information_v1.2.xml.
- Click vào nút Install Add-on.
Chỉnh sửa template andy_information.
Chỉnh sửa template andy_information_quick_links.
Làm thế nào để thêm tùy chọn sub-menu:
1. Chỉnh sửa file library/Andy/Information/Information.php và thêm mã "public function actionExample()".
Mã:
<?php
class Andy_Information_ControllerPublic_Information extends XenForo_ControllerPublic_Abstract
{
public function actionIndex()
{
// send to template
return $this->responseView('Andy_Information_ViewPublic_Information', 'andy_information');
}
public function actionExample()
{
// send to template
return $this->responseView('Andy_Information_ViewPublic_Information', 'andy_example');
}
}
2. Mã actionExample sẽ là liên kết được gọi như thế này:
Mã:
http://www.site.com/information/example/
3. Bạn cũng sẽ cần phải tạo ra template andy_example.
Chúc các bạn thành công.
Nguồn: xenforo.com
Đính kèm
Bài viết liên quan
Bài viết mới