User Tools

Site Tools


how_to_create_a_page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
how_to_create_a_page [2019/12/06 23:07]
admin [How To Separate HTML from PHP - Use A Template View]
how_to_create_a_page [2020/01/18 04:21] (current)
108.162.218.135 [How To Separate HTML from PHP - Use A Template View]
Line 16: Line 16:
 ===== How To Separate HTML from PHP - Use A Template View ===== ===== How To Separate HTML from PHP - Use A Template View =====
  
-Mostly a page looks different in each and every template. That's when we need to separate the HTML from the PHP logic. This is where a LiteCart View Object will become ​handy. Simply fill it with data and stitch it with a view.+Mostly a page looks different in each and every template. That's when we need to separate the HTML from the PHP logic. This is where a LiteCart View Object will come in handy. Simply fill it with data and stitch it with a view.
  
 <file php pages/​mypage.inc.php>​ <file php pages/​mypage.inc.php>​
Line 43: Line 43:
 </​file>​ </​file>​
  
-Any snippet can be retrieved by one of the following, depending on when most suitable:+Any snippet can be retrieved by one of the following, depending on what is most suitable:
   * <?php echo $parameter; ?>   * <?php echo $parameter; ?>
   * {snippet:​parameter}   * {snippet:​parameter}
  
 If a passive snippet is not defined it can be inserted by a later defined global variable. Otherwise cleaned up before sent back to the browser. If a passive snippet is not defined it can be inserted by a later defined global variable. Otherwise cleaned up before sent back to the browser.
how_to_create_a_page.txt ยท Last modified: 2020/01/18 04:21 by 108.162.218.135