multisite one database again

Author Message

Pesti Pal

Friday 13 July 2007 2:24:52 am

I'm new to ez publish, and i need help, because i think i'm stuck.

I have installed ez 3.9.2 with a plain_site, i copied the configuration of plain_site into a new siteaccess, made the necessary adjustments and it works.

The problem is: i want only the subfolders of site1 to be available in the menu.. Same for site2.

In content view i have it like this:

EZ
|
|-site1(node 59)
|-site2(node 60)

When I browse index.php/site1 it shows contents of site1, but the menu has a link to site1 and site2 two!
when i click site1 it shows index.php/site1/site1 and
when i click site2 it shows index.php/site1/site2

I want two completly different sites from the user's perspective. With content common only at the database level.

i have tried to set in toolbar.ini.append.php:

parent_node=59
RootNodeID=59

in site.ini.append.php:

RootNodeDepth=59
IndexPage=/content/view/full/59/
DefaultPage=/content/view/full/59/

and in menu.ini.append.php:

[Topmenu_content]
URL[]
URL[default]=content/view/full/59
URL[browse]=content/browse/59

But nothing. I know the menu is implemented at the pagelayout level, so nothing seems to affect it!
I cleared cache 100 times.

Thanks in advance

Pesti Pal

Friday 13 July 2007 5:55:44 am

Modified flat_top.tpl:

 menuitems=fetch( content, list, hash( parent_node_id, 2,
                                               class_filter_type, include,
                                               class_filter_array, ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ), sort_by, $root_node.sort_array ) )}

to

 menuitems=fetch( content, list, hash( parent_node_id, 

<b>59</b>

,
                                               class_filter_type, include,
                                               class_filter_array, ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ), sort_by, $root_node.sort_array ) )}

Isn't there an easyer way?
I haven't seen anywhere in the code that ez checks any of parent_node settings, it just puts 2 in it... is this a bug?

Betsy Gamrat

Sunday 15 July 2007 8:54:54 am

Hi,

2 is usually the top of the content tree. If changing it to 59 works for you, then you're all set.

If you would like the setting derived out of the .ini file, you could use something similar to:

menuitems=fetch( content, list, hash( parent_node_id,
ezini(  'SiteSettings','RootNodeID','site.ini'), 
class_filter_type, include,
class_filter_array, ezini( 'MenuContentSettings', 'TopIdentifierList', 'menu.ini' ), 
sort_by, $root_node.sort_array ) )} 

I didn't verify the syntax and labels on this, but the basic idea is to use ezini to get the RootNodeID out of site.ini.append.php

Good luck.

Pesti Pal

Monday 16 July 2007 1:04:26 am

Altered the code as you wrote. It works fine and I don't even need to make copies of flat_top.tpl.

Thanks

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 18 2025 16:15:13
Script start
Timing: Jan 18 2025 16:15:13
Module start 'layout'
Timing: Jan 18 2025 16:15:13
Module start 'content'
Timing: Jan 18 2025 16:15:13
Module end 'content'
Timing: Jan 18 2025 16:15:13
Script end

Main resources:

Total runtime0.0157 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.0313152.6406
Module start 'layout' 0.00540.0033 740.671939.4766
Module start 'content' 0.00870.0049 780.148493.4766
Module end 'content' 0.01350.0021 873.625034.3047
Script end 0.0156  907.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002415.6123140.0002
Check MTime0.00116.9276140.0001
Mysql Total
Database connection0.00127.586910.0012
Mysqli_queries0.002918.346830.0010
Looping result0.00000.089810.0000
Template Total0.001711.110.0017
Template load0.00095.721810.0009
Template processing0.00085.357910.0008
Override
Cache load0.00063.958610.0006
General
dbfile0.00031.735780.0000
String conversion0.00000.053340.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