Using domain name to pull/filter content from a specific entry in a root-level collection
  • I have three domains which I want to "connect" to a specific entry in a root-level collection. What would be the best practise to do so whilst still keeping the local and staging environment working?

    Perhaps there is a way of setting some kind of session that will set the "domain-variable"?

    <v:collection path="/rootlevel[url='mydomain.com']">

  • 3 Answers sorted by
  • You can use host() to fill in the current domain.

  • host() seems to only return the staging domain (even in production), and no subdomains or even the main top level domain.

  • Realised what was going on, tried to access host through:
    <v:text path='host()' /> with single quotes rather than double.
    <v:text path="host()" /> work but leaves a single whitespace character at the end of the string.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion