Forums / Setup & design / RootNode and Bread-crumbs

RootNode and Bread-crumbs

Author Message

Lachy Laycock

Tuesday 25 November 2003 8:51:40 am

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

Marco Zinn

Wednesday 26 November 2003 3:14:42 pm

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_3/forum/setup_design/toppath_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") 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"?

Marco
http://www.hyperroad-design.com