play_ Posted February 16, 2008 Share Posted February 16, 2008 How is this usually done? For example, say I make a layout for a certain cms, and wherever i put {page-title} the title of the page gets displayed. How is this being accomplished? is it using regexp to match and replace before the html is outputted? Link to comment https://forums.phpfreaks.com/topic/91363-templating-not-smarty/ Share on other sites More sharing options...
phpSensei Posted February 16, 2008 Share Posted February 16, 2008 Well you put the HTML into a CONSTANT and define it on both SCRIPT page and Include File where it lies. You set the Constant to lets say "News", and you str_replace('{_USERNAME_}',$username,News); I never use this method because you can add LOOPS, because this method is false. There are other ways I havnt explored either.. Link to comment https://forums.phpfreaks.com/topic/91363-templating-not-smarty/#findComment-468169 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.