Feature proposal #6353
closedRewrite how template files are included
Description
Currently it uses a Class > Function usage. The problem with this is if you include it more than once it errors. This means you can't have per-stream template usage. Instead the template function should return a URL path that can then be output via a require call. This is in short how Joomla layouts function.
See CB Core Fields Ajax for first implementation of this new template usage.
Updated by krileon almost 8 years ago
- Target version changed from 4.0.0 to 6.0.0
Updated by krileon almost 8 years ago
This should move as much as possible the logic out of the template files. For example the menu parsing should just be an array given to the template instead of a mass of IF checks. The templates need to be as much HTML and as minimal PHP as possible.
Updated by krileon almost 7 years ago
Follow CB Package Builder template usage. Also implement support for paths in template file usages (e.g. core_activity/parse) to allow for nested template files for better organization (e.g. comments/edit, comments/comment, etc..).
Updated by krileon over 5 years ago
- % Done changed from 10 to 30
Template files are also being split into more smaller template files. This will give greater control over styling. For example tags.php is now tags.php, tags_rows.php, and tag_container.php. This will for example allow overriding how the rows grid is styled without having to touch the other templates minimizing what you need to edit and replace.
In addition to this a lot of the PHP is being moved out of the template files (as much as possible) to the component to make it easier to edit the styling without breaking logic.
Updated by krileon over 5 years ago
- % Done changed from 30 to 50
Likes, Following, and Tags templates all rewritten.
Updated by krileon over 5 years ago
- % Done changed from 50 to 60
Template files are now being organized into subfolders for better organization. For example all core activity handling will be in the "core" folder. Example as follows.
/core/display/login.php
/core/display/logout.php
/core/access.php
/core/source.php
/core/display.php
Updated by krileon over 5 years ago
- % Done changed from 60 to 90
Needs stream parameter to select template on a per stream basis. All template files have now been rewritten.
Updated by krileon over 5 years ago
- % Done changed from 90 to 80
attachment template files still need some work
Updated by krileon over 5 years ago
- % Done changed from 80 to 90
per-stream template parameter now implemented for Activity, Comments, Notifications, Tags, Likes, and Follows.
Updated by krileon over 5 years ago
- Status changed from Assigned to Resolved
- % Done changed from 90 to 100