![]() |
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} 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. |
Re: Beginners Example of Static Page with Dynamic Content
This is close to what I'm trying to do. I have an empty static page, that I want to load the home page of a Knowledge Base installation.
I tried using this code: Code:
{$page_content} But it doesn't load the page. Any idea what I'm doing wrong? Thanks, Dan |
Re: Beginners Example of Static Page with Dynamic Content
You should include a tpl file not a php.
|
Re: Beginners Example of Static Page with Dynamic Content
Thanks. I got it in there using a php include, but now I think that the application itself would have to be rewritten (basically) to work within an embedded page.
|
All times are GMT -8. The time now is 03:33 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.