Jimako-e107-plugins / e107-old-plugins

Just backup
4 stars 4 forks source link

Content Management Templates #12

Open Jimmi08 opened 4 years ago

Jimmi08 commented 4 years ago

Contents 1 Template Folders 2 Template Files 2.1 Template Theme Files 2.2 Layout Theme Files Template Folders Content manager comes with an enhanced set of templates, which can be found in the content/templates/ folder.

Global explanation of the content/templates/ folder: In the templates folder you will see three php files and a folder called default. The three php files are the following:

content_manager_template.php content_submit_type_template.php content_type_template.php These files control pages in content that are not related to a certain main parent category, these are so called independent template files.

The default folder holds a number of php files that are dependent on the main parent category. These files are explained later on.

You can edit all template files to fit your own needs.

However, a better approach is to copy the default folder to a new one within the templates folder and work on these. Doing this allows for multiple sets of templates to be created and leaves the default set intact. These sets of templates are known as themes in Content Manager.

Support for content templates in your site theme: Content also allows you to have the template files within your theme. In order to do this, you need to have a folder called content in your theme folder. Within this folder you will need to have ALL template files from the default folder AND the three independent template files from the root of the content/templates/ folder. Do not put any of the templates in sub-folders.

Control which template will be used for all the content pages: The theme to be used can be set for each Content Manager category and is set in the Path and Theme page of the admin area of the content manager options.

Template Files The following files are included as part of the default Content Manager theme:

content_archive_template.php content_author_template.php content_cat_template.php content_content_template.php content_content_template_bigtext.php content_content_template_blackonwhite.php content_content_template_whiteonblack.php content_np_template.php content_recent_template.php content_score_template.php content_searchresult_template.php content_search_template.php content_top_template.php These files fall in to two broad categories - template theme files and layout theme files.

Template Theme Files These files determine how certain Content manager specific pages are rendered. Pages such as Author list and Content Archive are controlled by these files.

There should be one each of these files in any given template theme. The files are:

content_archive_template.php content_author_template.php content_cat_template.php content_content_template.php content_np_template.php content_recent_template.php content_score_template.php content_searchresult_template.php content_search_template.php content_top_template.php Layout Theme Files These files are used to determine how a content page is rendered. Having multiple layout theme files allows the page author to choose a layout for the page.

All these files are prefixed content_contenttemplate. The layout theme files supplied with the Content Manager are:

content_content_template.php content_content_template_bigtext.php content_content_template_blackonwhite.php content_content_template_whiteonblack.php When a page is created or edited and the layout schemes option is enabled (in the Admin->Admin: Create Items page) the author will be able to select which layout is to be used for the page from a drop down list. This list will be populated with the name of the layout which is taken from the file name, by default this is default, bigtext, blackonwhite and whiteonblack.

Note: the file content_content_template.php is always the default layout.