This shows you the differences between two versions of the page.
en:public:developer:template_system:tags:url:staticbasehref [2012/11/11 18:39] admin |
en:public:developer:template_system:tags:url:staticbasehref [2013/01/05 16:06] (current) admin [Attributes] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== <#Staticbasehref> ===== | + | ===== <#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) | 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) | ||
Line 6: | Line 6: | ||
refers to http://foo.example.com/dir1/dir2/images/exemple.jpg. the base URL/target is configured in the [[en:public:developer:template_system:urlresources]] configuration file | refers to http://foo.example.com/dir1/dir2/images/exemple.jpg. the base URL/target is configured in the [[en:public:developer:template_system:urlresources]] configuration file | ||
- | ==== 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: static.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 ==== | ||
Line 50: | Line 55: | ||
==== Example ==== | ==== Example ==== | ||
- | <code> | + | |
- | <#staticbasehref> | + | <code html> |
+ | <img src="<#staticbasehref>/images/my_image.jpg" alt="my_image" /> | ||
</code> | </code> |