Documentation You are here: start » v » 1.0 » templates

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
v:1.0:templates [2012/07/31 20:46] – external edit 127.0.0.1v:1.0:templates [2012/11/05 16:58] – [Using Twig with FoxyCart] foxyluke
Line 125: Line 125:
  
 If, however, you do want more control, you don't have to use the ''block'' and ''use'' method, and you can instead just start with the underlying default template and customize from there. These links will show you the Twig templates from which you can start from: If, however, you do want more control, you don't have to use the ''block'' and ''use'' method, and you can instead just start with the underlying default template and customize from there. These links will show you the Twig templates from which you can start from:
-  * [[https://admin.foxycart.com/v/1.0.0/view/cart_template.twig|Cart]] +  * [[https://admin.foxycart.com/v/1.0.0/view/public/cart.inc.twig|Cart]] 
-  * [[https://admin.foxycart.com/v/1.0.0/view/cart_template.txt.twig|Cart Text]] for Text Emails +  * [[https://admin.foxycart.com/v/1.0.0/view/public/cart.inc.txt.twig|Cart Text]] for Text Emails 
-  * [[https://admin.foxycart.com/v/1.0.0/view/checkout_template.twig|Checkout]] +  * [[https://admin.foxycart.com/v/1.0.0/view/public/checkout.inc.twig|Checkout]] 
-  * [[https://admin.foxycart.com/v/1.0.0/view/checkout_error_template.twig|Checkout Errors]] +  * [[https://admin.foxycart.com/v/1.0.0/view/public/checkout_error.inc.twig|Checkout Errors]] 
-  * [[https://admin.foxycart.com/v/1.0.0/view/receipt_template.twig|Receipt]] +  * [[https://admin.foxycart.com/v/1.0.0/view/public/receipt.inc.twig|Receipt]] 
-  * [[https://admin.foxycart.com/v/1.0.0/view/email_order_details.twig|Email (HTML)]] +  * [[https://admin.foxycart.com/v/1.0.0/view/public/email_order_details.inc.twig|Email (HTML)]] 
-  * [[https://admin.foxycart.com/v/1.0.0/view/email_order_details.txt.twig|Email (Text)]]+  * [[https://admin.foxycart.com/v/1.0.0/view/public/email_order_details.inc.txt.twig|Email (Text)]]
  
 If you use any of the above linked files as a starting point, you can insert that raw Twig+HTML directly into your FoxyCart template (either directly in the admin or in your own templates for use with AutoMagiCache). If you use any of the above linked files as a starting point, you can insert that raw Twig+HTML directly into your FoxyCart template (either directly in the admin or in your own templates for use with AutoMagiCache).
Line 142: Line 142:
 === Allowed Twig Tags and Functionality === === Allowed Twig Tags and Functionality ===
 At present, the only allowed functionality for Twig is as follows: At present, the only allowed functionality for Twig is as follows:
-  * Tags: ''if'', ''for'', ''include'', ''macro'', ''block''+  * Tags: ''if'', ''for'', ''include'', ''macro'', ''block'', ''set''
   * Filters: ''escape'', ''raw'', ''length''   * Filters: ''escape'', ''raw'', ''length''
 ===== Default Template Styles ===== ===== Default Template Styles =====
Line 182: Line 182:
  
 ==== Important Notes ==== ==== Important Notes ====
 +  * **Linked Stylesheets if the ''rel'' attribute is after the ''href'' attribute.** This one is weird, and //shouldn't// be a problem (the regex is perfect), but if you have ''<link>'' elements that aren't being cached, switch the order of the attributes and put the ''rel="stylesheet"'' before the ''href'' attribute.
   * **Preventing Hotlinking?** If you're running scripts to prevent hotlinking, that may interfere with the template caching. If images aren't showing up properly, turn off your hotlinking protection while you cache your templates.   * **Preventing Hotlinking?** If you're running scripts to prevent hotlinking, that may interfere with the template caching. If images aren't showing up properly, turn off your hotlinking protection while you cache your templates.
   * **Attributes must be enclosed in single or double quotes** like ''src="foo/bar"'' or ''src='foo/bar'''.   * **Attributes must be enclosed in single or double quotes** like ''src="foo/bar"'' or ''src='foo/bar'''.

Site Tools