We have a single ez install for a client with 2 sites. Each site is on a seperate domain and is a child of the ez root node.
There is a third domain and siteacess for the 'admin'.
When content from site A links to content on site B the /siteB/ appears in the link url. This is a problem.
What is the recommended eZ publish solution for our scenario? Creating external links to jump between site A and Site B seems a very bad hack that doesn't leverage the settings and internal link smarts.
We are very concerned that linking to nodes across siteaccess don't resolve the urls. Do we have to get into the url_alias() kernel function and fix this to read the path-prefix to URL mapping? becuase that is where we are headed to solve this problem.
Are we just missing some obvious INI settings?
Any help is greatly appeciated as this effects deploying several client sites
There's no built-in eZ Publish solution. However, you could create a custom template operator that does string replaces for cross-siteaccess links. No hacking needed. I just wrote about this here: http://www.mugo.ca/Blog/ezpublish-cross-siteaccess-internal-links
If you don't want to read the post, here are the 3 main steps:
1. Create some INI setting mappings from the siteaccess path prefixes to their corresponding domain names
2. Create the operator
3. Override templates/content/datatype/view/ezxmltags/link.tpl to pass all eZ XML links through your custom operator before final processing with ezurl()
The template operator works great, but I wanted to add a question and see if there were any suggestions:
I have a default siteaccess set to:
'/'
and then three subsiteaccesses set to:
'/site1'
'/site2' '/site3'
Unfortunately, my default siteaccess is not set up as /default, but rather is based off of /, as a result, linking between the three sub siteaccesses works fine when linking between the sub-siteacesses (site1, site2, site3), but anything in the default siteaccess does not not succeed in pulling out the subsiteaccess prefix...
I assume the reason for this is that the default siteaccess does not have a prefix with which to match pathURL in pathPrefixURLMap... any suggestions on how to solve this?
Thanks for replying. I tired adding the PathPrefix to my default siteaccess and enabling the RemoveSiteAccessIfDefaultAccess as well.
Unfortunately, I had the same result. I didn't mention as well that the subsiteaccesses (site1, site2, and site3) all had their RootNodeDepth set to 2, and IndexPage and DefaultPage set to their respective Root Nodes. I'm not sure if this was affecting the custom template operator provided by mugo.ca. Regardless, in interest of getting this working, I moved away from using something like: {$href|prefixurl()|ezurl()}
as suggested, and instead did something like this: