User Tools

Site Tools


en:public:developer:template_system:tags:url:staticbasehref

This is an old revision of the document!


<#Staticbasehref>

This tag Return the base URL/target for all relative URLs that point to static documents (Ex: .jpg, .js, .css, etc.). 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 /images/exemple.jpg/ refers to http://foo.example.com/dir1/dir2/images/exemple.jpg. the base URL/target is configured in the urlresources configuration file

Attributes

  • WithoutProtocol - Optional - 1 or 0 (default): Remove the protocol scheme (ex: http://) from the result sdflkdkjs dsflkdsklkjldfs dsflkfsdklklfds fdlkdsfkldfsk fdklfsdkldfskldf dfskldfslk

urlresources configuration

the urlresources configuration file must contain the definition of the staticbasehref for all versions (mobile, secure, language) of the website. Ex :

[StaticContentBaseHref]<url_https=0><url_mobile=0>
DEU = http://static.arkadia.com
ESP = http://static.arkadia.com
FRA = http://static.arkadia.com
PTG = http://static.arkadia.com
RUS = http://static.arkadia.com
USA = http://static.arkadia.com

[StaticContentBaseHref]<url_https=0><url_mobile=1>
DEU = http://static.arkadia.mobi
ESP = http://static.arkadia.mobi
FRA = http://static.arkadia.mobi
PTG = http://static.arkadia.mobi
RUS = http://static.arkadia.mobi
USA = http://static.arkadia.mobi

[StaticContentBaseHref]<url_https=1><url_mobile=0>
DEU = https://d3lesla81fvka2.cloudfront.net
ESP = https://d3lesla81fvka2.cloudfront.net
FRA = https://d3lesla81fvka2.cloudfront.net
PTG = https://d3lesla81fvka2.cloudfront.net
RUS = https://d3lesla81fvka2.cloudfront.net
USA = https://d3lesla81fvka2.cloudfront.net

[StaticContentBaseHref]<url_https=1><url_mobile=1>
DEU = https://d3krzxbc34g413.cloudfront.net
ESP = https://d3krzxbc34g413.cloudfront.net
FRA = https://d3krzxbc34g413.cloudfront.net
PTG = https://d3krzxbc34g413.cloudfront.net
RUS = https://d3krzxbc34g413.cloudfront.net
USA = https://d3krzxbc34g413.cloudfront.net

Example

<#staticbasehref>
en/public/developer/template_system/tags/url/staticbasehref.1352644853.txt.gz · Last modified: 2012/11/11 18:40 by admin