Template Structure

Register an Account
 
 
Article Tools Display Modes
  #1 (permalink)  
Old 12-03-2008, 03:42 PM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Reserved for future content.
Attached Thumbnails
Template Structure-template_structure.png  

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!

Last edited by Yankidank; 12-06-2008 at 03:22 PM.
Reply With Quote
  #2  

Template Structure

« Previous Chapter   Templates

Pligg's default template can be divided up into 6 parts to demonstrate how the template files work together to generate a page. This wiki entry will outline those 6 parts, please begin by opening the attached image file for use in this tutorial for reference.

 

Templates - Contents

Header


The header area is designated the number 1 in the attached image.
The header uses header.tpl to generate it's content. In some templates (such as Wistie) the file /sidebar_modules/categories.tpl is used to generate the categories in the header area.
The header area is used commonly for inserting the following data:
  • Search field
  • Logo
  • Category navigation
  • Submit
  • Upcoming and Published navigation
  • Groups and Create Group
  • Other common navigation buttons (profile, admin, login, logout, register)

Main Body


The main body area is designated the number 2 in the attached image.

The following templates are used to insert data into the main body:
  • group_center.tpl
  • group_story_center.tpl
  • index_center.tpl (which includes link_summary.tpl)
  • live_center.tpl
  • live_comments_center.tpl
  • live_published_center.tpl
  • live_unpublished_center.tpl
  • login_center.tpl
  • page_mod.tpl
  • profile_center.tpl
  • register_center.tpl (and register_step_1.tpl)
  • rssfeeds.tpl
  • search_advanced_center.tpl
  • search_center.tpl
  • settemplate_center.tpl
  • story_center.tpl (which includes link_summary.tpl)
  • submit_step_1.tpl
  • submit_step_2.tpl
  • submit_step_3.tpl
  • tag_cloud_center.tpl
  • topusers_center.tpl
  • upcoming_center.tpl
  • user_center.tpl
The main body area is used commonly for inserting the following data:
  • Registration Form
  • Login Form
  • Story Page (See also Story Data, number 5)
  • Search Results



Sidebar


The sidebar area is designated the number 3 in the attached image.
Pligg supports up to 2 sidebars without having to make any complicated edits. If you want to call a second sidebar, just add {include file=$tpl_second_sidebar.".tpl"} to pligg.tpl where you want sidebar2.tpl inserted. This could be anywhere on your site, not just to the side of the main body.

Sidebar content is something we refer to as "sidebar widgets". These items are covered in more depth further down on the page and are demonstrated through the number 6 on the image.

The sidebar area is used commonly for inserting the following data:
  • Search field
  • Login form
  • Registration form
  • Sort story links (Top today, yesterday, week, month, year, etc.)
  • Latest Comments
  • Top Tags
  • Top Stories Today
  • Latest Stories

Footer


The footer area is designated the number 4 in the attached image.
The footer area is used commonly for inserting the following data:
  • Copyright Information
  • RSS Information
  • Advanced Search link

Story Data


The story data area is designated the number 5 in the attached image.

The story data area is used to insert story content into the main body area. This includes the main story, comments, and who voted.

Template files used to generate the story data:
  • link_summary.tpl
  • story_center.tpl
  • comment_form.tpl
  • comment_show.tpl
  • edit_comment_center.tpl

Sidebar Widgets (Modules)


The sidebar widget data area is designated the number 6 in the attached image.

The sidebar widgets are the individual template files found in the /sidebar_modules/ folder included with a template. These items are small blocks of content that get inserted into the sidebars.

See the sidebar definition for examples of sidebar widgets.

« Previous Chapter   Templates

Contributors: Yankidank
Created by Yankidank, 12-03-2008 at 03:42 PM
Last edited by Yankidank, 12-06-2008 at 04:06 PM
1 Comments , 7765 Views
 

Tags
design, guide, template

Article Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
LemonTwist Template (Free) by Yankidank Yankidank Free Templates 53 01-17-2012 07:56 AM
Pligga - The Exclusive Pligg 1.0 Template Techkr Templates for Sale 27 07-19-2009 11:12 PM
MacBlue Free Pligg Template by Yankidank Yankidank Free Templates 18 01-20-2009 03:05 PM
Template Files Yankidank Wiki Articles 1 12-06-2008 03:14 PM
How to use your own template file structure? stephencarr Questions and Comments 9 08-21-2006 04:35 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development