ezurl and multiple site install

Author Message

Jon Staines

Monday 03 December 2007 3:16:53 am

Hi,

The problem seems to be when I use ezurl to make a link on a system which has multiple sites running off a single db. Imagine the very simplified diagram below.

Home(111)
 - News(112)
Home(222)
 - News(223)

Two sites, one with a root node of id 111 and one of id 222. If in the second site I feed News into ezurl, it returns the News folder of the first site.

I don't mind feeding in the node id via an ini setting to get around this problem, but is there a better way of telling ezurl to look only within the same section/siteaccess?

André R.

Monday 03 December 2007 4:28:23 am

Could you post the actuall code you are talking about, and the workaround you are using?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Jon Staines

Monday 03 December 2007 4:41:50 am

Thanks for a response. The code I was using was:

<a href={'Visiting/Exhibitor-List'|ezurl}>Exhibitor List</a>

But as there was a Visiting/Exhibitor-List in both sections, it found the wrong one. So I replaced it with:

<a href={concat('/content/view/full/',ezini('ExhibitorNodeSettings','ExhibitorNode','content.ini'))|ezurl}>Exhibitor List</a>

And added the node id to each siteaccess's content.ini.append.php

André R.

Monday 03 December 2007 5:27:52 am

If they are both in the same folder, one of them probably has a nice url like this:

{'Visiting__1/Exhibitor-List'|ezurl}

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Jon Staines

Monday 03 December 2007 5:38:07 am

They're in different folders. The structure is more:

RootNode
-Home
 -Visiting
   -Exhibitor List
-Home
 -Visiting
   -Exhibitor List

So I could probably use

{'Home/Visiting/Exhibitor-List'|ezurl}

and

{'Home2/Visiting/Exhibitor-List'|ezurl}

, I just wondered if there was a way to let ezurl always look in one place first. Both Home nodes use the short name to be Home as the node's name is the site name. This is why it is Home2 instead of Home__1.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.