Friday 01 October 2004 10:32:53 am
We accomplished this for a client who wanted certain areas of the site to be transitioned in slowly. Before the transition, the link would be in place, but it would direct users to a page on another server. After their content was ready, the link would then be switched back to the local "full" view. To do this, we added a checkbox and URL datatype to the folder class. The check box is called "Link directly to URL" (link) and "URL to Link to" (url). If the content admin checks this box and enters a URL, the following template code sniffs that out, uses the URL location for the href instead of the content/view/full/XX. It is the switch case which looks to see if the value of the checkbox is checked, and if it is, substitutes the external URL
{section name=Folder loop=$folder_list max=1}
{switch match=$Folder:item.data_map.link.content}
{case match=1}<a class="footerlink" href="{$Folder:item.data_map.url.content}">{$Folder:item.name|wash}</a>{/case}
{case}<a class="footerlink" href={$Folder:item.url_alias|ezurl}>{$Folder:item.name|wash}</a>{/case}
{/switch}
{/section}
http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions
|