Overview of Article Template Structure
- layingback
- Site Admin
Overview of Article Template Structure
There nothing technically different between Pro_News Article Templates - the ones used to display the articles - and any other Dragonfly templates. But they are employed a little differently, so the description here will hopefully save template or theme designers a little experimentation time.
Pro_News article templates are stored in a separate dedicated directory withing the theme, this is primarily to allow new templates to be added and selected easily in Admin > Pro_News > Config without worry of selecting a non-Article template. (Note that with 9.1 users can leave the article template in the default theme folder. Pro_News will look first for an article template folder in the current theme folder; but if found all article templates will be selected from that folder and the ones in the default theme will never be referenced.)
Template Structure
Each Article Template needs to consist of 5 parts:
newsempty to display simple text or error messages.
newshdline to display headlines only in home.
newshome to display articles without main content field in home.
newsarticle to display entire article (on its own).
preview_article to display the small block between the preview and submit article when user selects Preview.
newsempty and preview_article are typically going to be constant across all templates for a given theme, but they are small and stored here just for consistency and simplicity.
It should follow from this that each article needs 3 template entries - newshdline, newshome and newsarticle.
A couple of other items to note:
- newshdline has 2 levels, in order to facilitate a unique format for the first record, plus a common format for subsequent records;
- both newshdline and newshome requires 2 pagebreaks to be defined at the beginning of the definition, the first for display at a Section break, the second at a Category break (note that a Category break will always occur immediately after a Section break so the theme design needs to allow for this).
layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum
You cannot attach files in this forum
You can download files in this forum