plainblack.com
Username Password
search
Bookmark and Share

Root Url

Returns the top most root of the url string after the domain name.

For instance, if you're calling this under '/service/something/somethingelse', it returns 'service'.

We are using this to serve random ads for a service from a directory named the same as the section name in our Asset Tree. For instance, ads for /custom-programing are being served in a Page Layout template from '/home/ad-stuff/custom-programming'.

^RandomAssetProxy(^/;home/ad-stuff/^RootUrl;);

You could serve ads from anywhere by changing the argument to the base url of where your ads reside.

Diona Kidd 

----
Knowmad Technologies
http://www.knowmad.com

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
DownloadRootUrl.pm RootUrl.pm
LinksNo Support Offered
Statistics Downloads: 510
Views: 2934
Rating: 0
Updated: 1/9/2008
Keywords macros
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved