php - framework questions. How can I reuse the same template? -
I hope I can get a definite answer on this. I will try and explain it as I can.
I have a main template file that contains everything I want. Within a small area within this template, I want to resonate the view that is linked to the link that the user clicks on. It's not a problem anymore, but when I want to use loop data, it's not so easy anymore.
If I have this as my template:
Table Tr> td> & Lt ;? Php echo $ myContent; ? & Gt; & Lt; / Td / tr / table
You can clearly see how I will be able to resize the values of the variable. Now, suppose I want to show something to the user for which many rows of data were necessary. Then I have to use a loop, so you see, it depends on the content that I want to display determines how to construct within HTML.
Can anyone help me understand this? I'm sure it's just not me properly understanding how it should be done.
Thank you
& lt; Div & gt; & Lt; $ Content $ & gt; & Lt; & Lt;
/ div & gt;
While processing the output, you take the contents of template.html and parse it:
$ replace = array (); $ ['& Lt; $ Content $ & gt; '] = $ pagecontents; $ Template = file_get_contents ('template.html'); $ Output = straw_reale (array_kiz ($ replaced), $ substitution, $ template); Optimized from
Comments
Post a Comment