User Tools

Site Tools


en:public:developer:template_system:tags:url:basehref

Differences

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

Link to this comparison view

en:public:developer:template_system:tags:url:basehref [2012/11/11 18:24]
admin created
en:public:developer:template_system:tags:url:basehref [2013/01/05 16:01] (current)
admin [Possible attributes]
Line 1: Line 1:
-===== <#basehref> =====+===== <#BaseHref> =====
  
-This tag Return the base URL/target for all relative URLs.  +This tag Return the base URL/target for all relative URLs. if the base URL/target finish with a slash '/' then it's will be removed from the result (ie: http://foo.example.com/dir1/ => http://foo.example.com/dir1) 
-For example, given basehref = http://foo.example.com/dir1/dir2 then the relative url /real-estate/residential/+ 
 +For example, given basehref = http://foo.example.com/dir1/dir2 then the relative url ///real-estate/residential///
 refers to http://foo.example.com/dir1/dir2/real-estate/residential/. the base URL/target is configured in the [[en:public:developer:template_system:urlresources]] configuration file refers to http://foo.example.com/dir1/dir2/real-estate/residential/. the base URL/target is configured in the [[en:public:developer:template_system:urlresources]] configuration file
  
-==== Possible attributes ====+==== Parameters ==== 
 + 
 +^ Name                                                            ^ Mandatory ^ Default ^ Description ^        
 +| <html><span style="color:#008000">WithoutProtocol</span></html> | No        | 0       | Remove the protocol scheme (ex: <nowiki>http://</nowiki>) from the result | 
 +| <html><span style="color:#008000">OnlyDomainName</span></html>  | No        | 0       | Return only the domain name (ex: arkadia.com) of the result | 
 +| <html><span style="color:#008000">OnlyHostName</span></html>    | No        | 0       | Return only the host name (ex: www.arkadia.com) of the result | 
  
-  * **WithoutProtocol** - 1 or 0 (default): Remove the protocol scheme (ex: <nowiki>http://</nowiki>) from the result 
  
 ==== urlresources configuration ==== ==== urlresources configuration ====
    
 +the [[en:public:developer:template_system:urlresources]] configuration file must contain the definition of the basehref for all versions (mobile, secure, language) of the website. Ex :
 +
 +<code>
 +[BaseHref]<url_https=0><url_mobile=0>
 +DEU = http://de.arkadia.com
 +ESP = http://es.arkadia.com
 +FRA = http://www.arkadia.com/fra
 +PTG = http://pt.arkadia.com
 +RUS = http://ru.arkadia.com
 +USA = http://www.arkadia.com/usa
 +
 +[BaseHref]<url_https=0><url_mobile=1>
 +DEU = http://de.arkadia.mobi
 +ESP = http://es.arkadia.mobi
 +FRA = http://www.arkadia.com/fra/mobile
 +PTG = http://pt.arkadia.mobi
 +RUS = http://ru.arkadia.mobi
 +USA = http://www.arkadia.com/usa/mobile
 +
 +[BaseHref]<url_https=1><url_mobile=0>
 +DEU = https://www.arkadia.com/deu
 +ESP = https://www.arkadia.com/esp
 +FRA = https://www.arkadia.com/fra
 +PTG = https://www.arkadia.com/ptg
 +RUS = https://www.arkadia.com/rus
 +USA = https://www.arkadia.com/usa
 +
 +[BaseHref]<url_https=1><url_mobile=1>
 +DEU = https://www.arkadia.com/deu/mobile
 +ESP = https://www.arkadia.com/esp/mobile
 +FRA = https://www.arkadia.com/fra/mobile
 +PTG = https://www.arkadia.com/ptg/mobile
 +RUS = https://www.arkadia.com/rus/mobile
 +USA = https://www.arkadia.com/usa/mobile
 +</code>
 +
 ==== Example ==== ==== Example ====
  
en/public/developer/template_system/tags/url/basehref.1352643878.txt.gz · Last modified: 2012/11/11 18:24 by admin