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.

eZ debug

Timing: Jan 31 2025 03:32:03
Script start
Timing: Jan 31 2025 03:32:03
Module start 'layout'
Timing: Jan 31 2025 03:32:03
Module start 'content'
Timing: Jan 31 2025 03:32:03
Module end 'content'
Timing: Jan 31 2025 03:32:03
Script end

Main resources:

Total runtime0.0229 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.2500151.2266
Module start 'layout' 0.00530.0038 739.4766220.7188
Module start 'content' 0.00920.0125 960.19531,001.8516
Module end 'content' 0.02170.0012 1,962.046937.9922
Script end 0.0229  2,000.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002611.3579140.0002
Check MTime0.00114.7613140.0001
Mysql Total
Database connection0.00114.932910.0011
Mysqli_queries0.00229.643230.0007
Looping result0.00000.056110.0000
Template Total0.00093.810.0009
Template load0.00073.096610.0007
Template processing0.00020.702910.0002
Override
Cache load0.00052.215810.0005
General
dbfile0.00208.917480.0003
String conversion0.00000.037440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs