Jump to content

Template System Help.


ipwnzphp

Recommended Posts

Hello, I'am coding a template system and i have an idea of what i want it to do. I have the basics down where i have a main.php page and i use {header} {footer} and such to layout the pages to put the content where i want it. But the question is OS Commerce has a thing called STS Templates and u use 1 page to theme the whole site. u put $content where you want the content and it shows every sub page with content right there. How can i get my system im coding to do that also? Much help well be very appreciated!  ;D
Link to comment
https://forums.phpfreaks.com/topic/35223-template-system-help/
Share on other sites

On your main.php page wherever you want your content, just put that var.
so if you have a header.php and footer.php it sounds like you do this:
<?
require_once('header.php');
$content;
require_once('footer.php');
?>

You should check the support forums for the software though, they likely have documentation for it.
Link to comment
https://forums.phpfreaks.com/topic/35223-template-system-help/#findComment-166325
Share on other sites

[quote author=redbullmarky link=topic=123503.msg510612#msg510612 date=1169482176]
maybe at this stage it'd be better to follow obsidians advice and look through Smarty (as well as templates such as bTemplate, phpSavant, etc) to see how they work.
[/quote]
Or read the OS Commerce documentation, or check out their forum. Instead of looking at another template system which would just confuse you, I'd think it'd make more sense to read about the one you're using...
Link to comment
https://forums.phpfreaks.com/topic/35223-template-system-help/#findComment-166444
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.