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.
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.