简体   繁体   中英

php smarty template structure

and i am creating simple php application with using smarty

i have file header, left ,body, and footer.

main index.php and

tpl file in templates folder containig templates.tpl other design tpl

i am calling in templates.tpl in index.php

index file contains url encode code.

i have also folder shop which have shop.php and same with other menu ...

i have configured smarty well but not succeed?

i have menu in header and left

when i click in menu than it will be not display the content in only body part

exa: header and left part has menu like home, contact us , shop and etc ..... i want click content in body part and header left and footer as usual through the all pages?

if i click on shop it will be display in new file and which containing the urlencode which shows in browser ?

i hope you understand my question ?

This is what I understand from your question-

You have index.php which renders to templates.tpl template and shop.php with some menus(Not clear if both have the same menus or different)

Are you rendering shop.php output to some template? like shop.tpl, if so.. You can have a structure something like

templates.tpl

{include file="menu.tpl"}
<!-- Templates body -->

shop.tpl

{include file="menu.tpl"}
<!-- Shop body -->

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM