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? Quote 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.. Quote Link to comment https://forums.phpfreaks.com/topic/91363-templating-not-smarty/#findComment-468169 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.