This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » RootNode and Bread-crumbs
expandshrink

RootNode and Bread-crumbs

RootNode and Bread-crumbs

Tuesday 25 November 2003 5:51:40 pm - 1 reply

Hi,

I have recently discovering the wonders of creating multiple sites that can share cascading template sets (with AdditionalSiteDesignList[]), and have uncovered a problem...

My Web host only allows me a fixed number of MySQL DBs and so I have been looking for a way to combine multiple sites with one DB (i believe this was possible for versions <3.2)...

My Solution:
Use the settings variable NodeSettings->RootNode to set the top page.

But alas it doesn't seem to work. So I have managed to create a few work arounds:

1. In the settings/siteaccess/*mysite*/site.ini.append file I set the DefaultPage and IndexPage nodes under my root dir (2) that will be the rootNode for each site. This works fine.

2. Change template links that point to '/content/view/full/2/' to concat("/content/view/full/",ezini('NodeSettings','RootNode','site.ini')

3. Hack the Bread-Crumbs (Path) display to show the RootNode value as 'Home' (NodeID: 2).

This last step I have been unable to do successfully.

I have tracked the source down to the function 'fetchPath' in ezcontentobjecttree.php, and have used the following dirty hack:

$nodePath = $this->attribute( 'path_string' ); [line: 1823]

to

$nodePath = $this->attribute( 'path_string' );
$nodePath = str_replace('/2/', '/', $nodePath);

simply removing the rootNode fixes this but I suspect the rabbit hole goes a little deeper than this and might break something somewhere else...

Does anybody have any ideas or suggesstions as to how this might be accomplished in a less destructive manner?

Regards,
Lachy

Modified on Tuesday 25 November 2003 5:53:24 pm by Lachy Laycock

Thursday 27 November 2003 12:14:42 am

Hm, I'm not sure, if i got your setup.
I suspect, that -because your MySQL DB count is limited- you want to put all content into on MySQL DB (for different sites) and let all content start "one level below root", so your sites "virtual root folders" are all children of root (node 2). Right?
When: Why do you want to show the "real" Root-Folder (2) anyway? Any click on that will have your visitors go up one level to much and see all websites...
Better hide the "root"-Folder from path (see my other posting http://ez.no/developer/ez_publish...oppath_without_root_folder#msg39292) and start with your "virtual home".

Besides that: I think, no version of ezP supports multiple websites in one MySQL DB. In 3.1, it was possible to install multiple "designs" (now: "Packages"blunk.gif Emoticon into one DB, while the new ez-3.2-installer does not support this.

Note: IMHO, if you really want distinct sites, you will need multple DB's.... how do you want to restrict the search engine, the admin interface etc, when everything is in one large "content tree"?

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from