View Single Post
  #1  
Old 08-01-2007, 08:24 PM
 
Hunabku Hunabku is offline
 

Advanced Member
  
Join Date: Jun 2006
Posts: 47
 

Default Beginners Example of Static Page with Dynamic Content

What follows is a simple example for including .tpls (and their dynamic content) in a static page. This example shows how to create a main category page that displays static page content before a dynamic listing of root categories.

Create a static page in admin, title it (ex "Our Catalog"), enter the page content and note the page id (see url ex ".../admin/pages.php?pageid=9")

At around line 7 of "customer/main/pages.tpl" replace:
Code:
{$page_content}

with:
Code:
{$page_content} {if ($smarty.get.pageid eq "9")} <br><br> {include file="customer/categories.tpl"} {/if}
Be sure to change the page id "9" above to your previously created page id.

Inside your pages.tpl you can create several if statements "id=n" for every static page that you want to include files in or alter the layout of.
__________________
Version 4.1.3
Reply With Quote