Linking in Cascade Server Adam Griffis Software Engineer Hannon Hill Corporation
Outline ● Managed vs. Non-Managed Links ○ Why are some links managed and others not? ● Cross-Site Linking ● <link> Element for Index Blocks ○ Why is it preferable to path? ● Cross-Configuration Linking
Managed Links ● Tracked ○ If the linked asset is moved, the link will be updated. ● Link to another asset in Cascade ○ No prefix if in the same site ■ /path/to/asset ○ Site name prefix if in another site ■ site://sitename/path/to/asset ● Automatic for some attributes in XML-based assets ○ Pages, XML & XHTML Blocks, Templates, XSLT Formats ○ http://www.hannonhill.com/kb/Linking/#managed- links-within-assets-containing-xml
Managed Link Attributes Element href src background a x area x x x body x x td x table x embed x x frame x iframe x img x input x x x param x x x link x x script x
Why would a link not be managed? ● No Asset with the given path present ● The path is in the wrong format ○ http://www.site.com/path/to/asset ● The path isnt within [system-asset] tags and isnt tracked automatically: ○ The path is not in a supported attribute ○ The document is not an xml-based asset.
Cross-Site Linking ● Just include the site://[site name]/ prefix ○ site://example.com/images/01.jpg ● Can only link between sites. ○ The global area can only be linked to by assets in the global area and can only link to other assets in the global area. ○ Any asset in a site can link to any other asset in the same site or another site, but cannot link to Global assets.
system-asset:local ● The system-asset:local tag means that the given path is evaluated for the page in which the link ultimately exists. ○ Useful for templates, reused blocks ● Example: Single banner HTML code, automatically customized to each site if they all have the banner image in the same location. ○ <img src="[system-asset:local]files/images/banner.jpg[/system-asset:local]" />
Index Blocks - <link> tag ● Preferable to the path tag because it includes the site prefix. ○ Should be used whenever using index blocks indexing other sites.
Linking between Configurations ● Links from a given configuration link to the same configuration on other pages. ○ Based on configuration name. ● [system-asset:configuration] ○ A page can link to a different configuration with the "system-asset:configuration" tag. ■ For example: a PDF download ■ <a href="[system-asset:configuration=pdf]/about/companyinfo.pdf [/system-asset:configuration]"> Download our Company Guide PDF </a> 2011 User Conference
Destination URLs ● Introduced in 6.10 ● Destination URLs are URL prefixes used when linking to configurations solely published to the given destination. 2011 User Conference