Elxis CMS Forum
Support => Elxis 4.x/5.x DEV => Topic started by: datahell on March 10, 2025, 21:44:21
-
A feature that will be available in upcoming Elxis 5.6 are the Page Generators. A Page generator is a custom block of code that generates the HTML of the page instead of the built-in component (actually the HTML of component's viewer). This allows us to achieve 100% customization of the pages layout and style. Page Generators are optional parts of a template. For now, page generators are available in component Content for:
- Category pages
- Articles
- Tags page
- Archive page
On each category/article you can select (or not) a page generator (if available on your template). Category "A"may have a totally different style of category "B", while category "C" might have the Elxis default style.
If you have a template named "supercool" Page Generators should be added here: templates/supercool/generators/
Page generators are php files and have special naming depending on their type. For instance page generators for categories must start with "category_". For articles with "article_" and for tags and archive the name is standard (content_tags and content_archive respectively).
Here are sample generators for template "supercool".
templates/supercool/generators/category_Blog.php
templates/supercool/generators/category_Blog2.php
templates/supercool/generators/category_List.php
templates/supercool/generators/article_presentation.php
templates/supercool/generators/article_tourism.php
templates/supercool/generators/content_tags.php
templates/supercool/generators/content_archive.php
When you edit a category you can select as generator: Component Content (Elxis default), Blog, Blog2 or List. If you change the template and the selected generator does not exist in the new template the page will be generated by component Content (fallback process).
More information after the release of Elxis 5.6
-
wow wow wowww 8) waiting for this datahell ;D customization at top level