Cross-Site Linking Question

jklingman's Avatar


23 Nov, 2010 02:19 AM

We are developing two sites that will share assets from a "Shared" site. We're attempting to create a format that calls all of the CSS files. Both the format and the CSS files are located on the "Shared" site. Then, the format will be called onto pages on the two sites. The format looks like this:

<xsl:template match="/">
<link href="/template/includes/style/primary.css" media="Screen" rel="stylesheet" type="text/css"/>
<link href="/template/includes/style/horzmenu.css" media="Screen" rel="stylesheet" type="text/css"/>
<link href="/template/includes/style/print.css" media="print" rel="stylesheet" type="text/css"/>
<link href="/template/includes/style/mobile.css" media="handheld" rel="stylesheet" type="text/css"/>        
<link href="/template/includes/style/home.css" media="Screen" rel="stylesheet" type="text/css"/>

Therefore, when the two main sites are published, they'll publish out the above tags. But we need the URL of the "Shared" site to be included in the "href". When we try to put "site://Shared" in the URLs, Cascade strips it out since the above format is already in the "Shared" site. Any suggestions? What are we missing? Thank you!

  1. 1 Posted by Lee Roberson (F... on 23 Nov, 2010 02:29 PM

    Lee Roberson (Function Digital LLC)'s Avatar

    Can you just use an XHTML block for this as a workaround? That is what we would have done for this.

  2. 2 Posted by Klingman, Justi... on 23 Nov, 2010 09:34 PM

    Klingman, Justin's Avatar

    Thanks for the reply, Lee. Unfortunately, changing it to an XHTML block didn't help. Cascade still stripped out the "site://Shared" part that I would need. We'd like to use a format because we may need to add some additional dynamic code. Do you have any other suggestions? Thank you!

  3. 3 Posted by Lee Roberson (F... on 23 Nov, 2010 10:23 PM

    Lee Roberson (Function Digital LLC)'s Avatar

    Hi Justin,

    We're running the 6.7.x series. In that line at least, when you write a path in an XHTML block and select it from a different site into a region (at the template, config set, or page level) the links automatically rewrite without the site prefix.

    So stripping out notwithstanding, the output of the page in the non-common site should have had a fully qualified path to the asset's publish location.

  4. 4 Posted by Lee Roberson (F... on 23 Nov, 2010 10:36 PM

    Lee Roberson (Function Digital LLC)'s Avatar

    Sorry for the double reply. I noticed you asked for other suggestions above.

    Anyway, I see what you are trying to do -- you want one central place where the code that generates these CSS tags resides. Unfortunately with the current architecture I think the best way to do that is to put your XSL in a foreign site and use the site://sitename/ syntax in your paths there to link to the "shared" site's CSS.

    So if you really want to stick with XSL maybe splitting your common site into a "shared"-assets and "shared"-code site would work out okay in this case.

  5. 5 Posted by Klingman, Justi... on 24 Nov, 2010 03:45 AM

    Klingman, Justin's Avatar


    This is a great solution. Works just the way you described. Thank you very much!

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac