Difference between revisions of "Overriding CjForum layouts"

From CjWiki
Jump to navigation Jump to search
(Layout overrides)
 
Line 4: Line 4:
 
To override a theme, copy a theme folder from components/com_cjforum/layouts to /templates/yourtemplatename/html/layouts/. Each theme has set of php files for complete forum pages. Modify the required layout with your changes. Here is the summary of list of layouts which you can override:
 
To override a theme, copy a theme folder from components/com_cjforum/layouts to /templates/yourtemplatename/html/layouts/. Each theme has set of php files for complete forum pages. Modify the required layout with your changes. Here is the summary of list of layouts which you can override:
  
activities_list.php - this is the template file for listing activities
+
* activities_list.php - this is the template file for listing activities
attachments.php - this is layout file for showing attachments. most of the time you may not need to modify this.
+
* attachments.php - this is layout file for showing attachments. most of the time you may not need to modify this.
category_list.php - this is the layout for displaying categories list on the index page
+
* category_list.php - this is the layout for displaying categories list on the index page
credits.php - this is the layout file for credits page. please keep the credits unchanged to give us credit.
+
* credits.php - this is the layout file for credits page. please keep the credits unchanged to give us credit.
footer.php - this is the footer page on the categories/list layouts, shows forum statistics
+
* footer.php - this is the footer page on the categories/list layouts, shows forum statistics
header.php - layout to display the header block including the logged in user avatar, login/logout form and shortcut urls.
+
* header.php - layout to display the header block including the logged in user avatar, login/logout form and shortcut urls.
online_users.php - display online users statistics above footer
+
* online_users.php - display online users statistics above footer
toolbar.php - layout to show toolbar on top of each page
+
* toolbar.php - layout to show toolbar on top of each page
topic_list.php - layout to display topics listing
+
* topic_list.php - layout to display topics listing
  
 
Please note that your override theme folder must contain all the above files even if you are overriding any single layout file.
 
Please note that your override theme folder must contain all the above files even if you are overriding any single layout file.

Revision as of 10:04, 13 June 2015

CjForum comes by default with a couple of themes, one based on Bootstrap v2 and other based on Bootstrap v3. You can override any of these themes to create your own theme.

How to override a theme

To override a theme, copy a theme folder from components/com_cjforum/layouts to /templates/yourtemplatename/html/layouts/. Each theme has set of php files for complete forum pages. Modify the required layout with your changes. Here is the summary of list of layouts which you can override:

  • activities_list.php - this is the template file for listing activities
  • attachments.php - this is layout file for showing attachments. most of the time you may not need to modify this.
  • category_list.php - this is the layout for displaying categories list on the index page
  • credits.php - this is the layout file for credits page. please keep the credits unchanged to give us credit.
  • footer.php - this is the footer page on the categories/list layouts, shows forum statistics
  • header.php - layout to display the header block including the logged in user avatar, login/logout form and shortcut urls.
  • online_users.php - display online users statistics above footer
  • toolbar.php - layout to show toolbar on top of each page
  • topic_list.php - layout to display topics listing

Please note that your override theme folder must contain all the above files even if you are overriding any single layout file.