-
Template Structure
Pligg's default template can be divided up into 6 parts to demonstrate how the template files work together to generate a page.
1. Header
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)
2. Main Body
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
3. Story Data
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
4. Sidebar
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 modules". 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
5. Sidebar Modules
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 sidebar area(s).
6. Footer
The footer area is used commonly for inserting the following data:
- Copyright Information
- RSS Information
- Advanced Search link