Tuesday 19 May 2009 4:41:25 pm
I am setting up a site with multiple domains on eZ Publish 4.1.1. I have my siteaccesses set up correctly so that each siteaccess has its own set of INI files and its own design folder. My problem is that I want each site to have its own root node be a different place in the content tree, e.g.:
Home
|
--Folder A [node 100]
|
--Article 1
--Article 2
|
--Folder B [node 200]
|
--Article 3
--Article 4
I would like www.siteA.com to start at node 100, and www.siteB.com to point to node 200. Simple enough, I set the IndexPage property for each siteaccess to either /content/view/full/100 or /content/view/full/200. However, that wasn't enough make the site work the way I'd expect. When I browsed to Article 1, for example, I was still seeing "/Folder A/" in the URL. So I added "Folder A" to the PathPrefix for that siteaccess, and the problem went away...
<b>The Problem</b> But I'm still seeing unexpected behavior. For example, the $module_result.path array for Article 1 still contains "Home". That array is used by the default ezwebin page_head.tpl to create the reverse-listed <title> tags on the site - I'd like to keep using that, but I have to manually strip out the first entry of the array every time I use $module_result.path. That seems wrong. In addition, when I fetch my root node by the following method: {def $root_node=fetch( 'content', 'node', hash( 'node_path', '/') )}
it returns node 2, the "Home" node, instead of node 100.
<b>What I Tried</b> I read in another forum post (http://ez.no/developer/forum/suggestions/a_way_to_change_the_root_node_of_a_siteaccess/re_a_way_to_change_the_root_node_of_a_siteaccess__9) that I should set RootNode (in content.ini) as well as RootNodeDepth and DefaultPage (in site.ini) as well as removing RootNodeDepth from override.ini. Elsewhere in the forums it sounded like RootNodeDepth was the answer to my problem of "locking" a siteaccess into its own section of the content tree. I tried the following:
(site.ini.append.php)
[SiteSettings]
IndexPage=/content/view/full/100
DefaultPage=/content/view/full/100
RootNodeDepth=2
(content.ini.append.php)
[NodeSettings]
RootNode=100
That had no effect, and there's actually a documentation comment indicating that DefaultPage does something entirely different: http://ez.no/doc/ez_publish/technical_manual/4_0/reference/configuration_files/site_ini#comment20548 To complicate matters, RootNodeDepth, RootNode, and DefaultPage are not in the 4.0 documentation at all. Can anyone please tell me what I should do to limit each siteaccess to its own section of the content tree the way I've described above? Thank you!
Me: http://jordan.teamhirsch.com
My blog: http://wiredformusic.blogspot.com
My other company: http://thinkimprov.com
eZ Certification: http://auth.ez.no/certification/verify/402488
eZ Award: http://ez.no/company/news/ez_awards_2007_prize_winners
|