Last Updated 9 months ago

How to add and edit my own template?

Instructions for modifying templates

General information

The templates are located in the modules/pshowblog/views/themes/ folder.
They can be freely edited to suit your store. To modify a template, it is best to copy an existing template and redesign it.

Templates for the entry list are in the directory: modules/pshowblog/views/themes/theme_name/list/
The templates for the entry page are in the directory: modules/pshowblog/views/themes/theme_name/page/
"theme_name" - The name of the directory, which is the name of the template.

The directory name must not contain spaces or special characters. To add a new entry list template or entry page, create a new directory with the required files in the appropriate path.
All variables for use in .tpl files, responsible for displaying back-office managed content, are in the default template of the module "seo-blog-2023"

The necessary files in the template

Required files for the entry list template:
  • list/ - folder with entry list appearance
    • post-list.css - css file of the template
    • post-list.tpl - t.pl file of the template
    • layouts-left.tpl - .tpl file for "5 posts in grid v1" template in the hook settings
    • layouts-right.tpl - the .tpl file for the "5 posts in grid v2" template in the hook settings
Required files for the entry page template:
  • page/ - folder with the appearance of the entry page
    • single-post.css - css file of the template
    • single-post.tpl - tpl file of the template
Other required files for the template:
  • screenshot.jpg - screenshot of the template appearance
  • thumb.jpg - thumbnail screenshot of the template appearance (this file is created automatically)

Notes when copying another template

If you don't see your changes in the list of entries from the copied template, then check in the file "views/themes/theme_name/list/custom_page.tpl" the content of the section {block name='content'} where the path to the post-list.tpl file is given, for example: {include 'module:pshowblog/views/themes/theme_name/list/post-list.tpl'}.
If you notice that "theme_name" is the name of the copied template, rename the directory to the name of our new template

Please Wait!

Please wait... it will take a second!