User Tools

Site Tools


en:public:developer:template_system:tags:parameters:default

Differences

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

Link to this comparison view

en:public:developer:template_system:tags:parameters:default [2013/01/26 21:53]
admin [Default]
en:public:developer:template_system:tags:parameters:default [2013/01/27 17:17] (current)
admin
Line 2: Line 2:
  
 Parameter "default" specifies the default value that will be returning if the called function (or var)  Parameter "default" specifies the default value that will be returning if the called function (or var) 
-return nothing.+return and **empty string** or a **null value**. 
 + 
 +**NOTE:** By default the content of the parameter "default" will be parsed (all <#..> tags will be evaluated)  
 +before to apply this filter. You can control this behavior throught the parameter  
 +[[en:public:developer:template_system:tags:parameters:AnalyzeTagParams]]
  
 ==== Example ==== ==== Example ====
  
-Assuming we would to print the menu. If some item of the menu hasn't any title we want to put &quot;ArKadia&quotinstead.+&lt;code&gt;
  
   <#page_title default="ArKadia">   <#page_title default="ArKadia">
 +
 +</code>
      
 **Case 1.** Page_title is "Special promotions". Output: **Case 1.** Page_title is "Special promotions". Output:
  
 +<code>
   Special promotions   Special promotions
 +</code>
      
 **Case 2.** Page_title is empty. Output: **Case 2.** Page_title is empty. Output:
  
 +<code>
   ArKadia   ArKadia
 +</code>  
en/public/developer/template_system/tags/parameters/default.1359222794.txt.gz · Last modified: 2013/01/26 21:53 by admin