+/-
+/-

±Donations

Donate with PayPal!
Help support Pro_News and become a member of our Sponsors Group
The tip jar is at PayPal, but does not require a PayPal account
macavity £ 10.00
Rusty_ $ 27.96
Gamekeeper £ 20.00
Witewolf $ 10.00
macavity $ 20.00
Arg0n4th $ 2.00

±User Info


مرحبا مجهول

(تسجيل)

عضوية:
الأخير: mehak
جديد اليوم: 0
جديد بالأمس: 0
الكل: 167

المتصفحون الآن:
الأعضاء: 0
الزوار: 20
Bots: 3
المجموع: 23
من و أي:
 الزوار:
Support Forums
Support Forums
Support Forums
Descargas
Support Forums
Home
Support Forums
Pro News Articles
Downloads
Support Forums
Support Forums
Pro News Articles
Support Forums
Downloads
Support Forums
Pro News Articles
Pro News Articles
Support Forums
Support Forums
Contact Us
 Bots:
Baidu > Support Forums
Google > Support Forums
Voila > Nedlastninger

فريق العمل متص:

لا أحد من فريق العمل متص

±Stop Software Patents

stopsoftwarepatents.eu petition banner

±30 Years of GNU

[ Celebrate 30 years of GNU! ]

Overview of Article Template Structure

Forum dedicated to discussion of articles posted in Home page of Pro_News
  

Overview of Article Template Structure

مساهمة ارسل: الاربعاء يناير 31, 2007 6:33 pm بواسطة layingback

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.39 - 2.2.12 / 4.4.7 - 5.1.37 / 5.5 / 9.2.1
 

 

layingback
Site Admin
Site Admin
 
 
 
Link  QR 
Share this صفحة للطباعة  facebook   google+   linkedin   twitthis  
Show more ...


لاتستطيع وضع مواضيع جديدة في هذا المنتدى
لاتستطيع الرد على المواضيع في هذا المنتدى
لا تستطيع تعديل مواضيعك في هذا المنتدى
لاتستطيع الغاء مواضيعك في هذا المنتدى
لاتستطيع التصويت في هذا المنتدى
You cannot attach files in this forum
You cannot download files in this forum