ngreenwood6 Posted August 2, 2009 Share Posted August 2, 2009 I am trying to figure out how sites do somethings. In the code I will see something like this: <td>{something}</td> How do I know where that something is and how could I recreate it? Quote Link to comment Share on other sites More sharing options...
gizmola Posted August 2, 2009 Share Posted August 2, 2009 We'd need a bit more context than that. Is this a template file? (.tpl) Quote Link to comment Share on other sites More sharing options...
ngreenwood6 Posted August 2, 2009 Author Share Posted August 2, 2009 yeah it is a template file. Quote Link to comment Share on other sites More sharing options...
gizmola Posted August 2, 2009 Share Posted August 2, 2009 Well there are many different template systems, but quite a few will do parsing and replacement using the {} to mark a block. In this way it's easy for designers to use html and then have blocks that come from php inside the markup. If this is framework code, you need to find where the .tpl file is being specified and see what code actually renders it. If it's a Model-View-Controller system, this will probably be a "view" class, and the items inside the curly brackets will have been injected into the class or class scope in some way, so that when the template is rendered, those items can be replaced with the content of the corresponding variables. Quote Link to comment 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.