Wednesday 21 April 2010 2:46:08 pm - 10 replies
Hi again. I'm busy building a rather complex multisite with different siteaccess for subdomains. I just tried to link from a node in one siteaccess to another one in another siteaccess in an xml field. This doesn't seem to be working. eZ generates urls like http://www.domain.com/<siteaccess>/link instead of http://<siteaccess>.domain.com/link.
I also noticed eZ Find does not handle indexing of multiple siteaccess in one database correctly, resulting in the same sort of links.
I used the following siteaccess mapping:
MatchOrder=host;uri
HostMatchType=map
HostMatchMapItems[]=sub1.domain.com;sub1
HostMatchMapItems[]=sub2.domain.com;sub2
For some reason eZ is only aware of the currect siteaccess, and does not take the siteaccess a node is in into account when rendering links.
Does anyone have tips how to solve this puzzle?
Monday 26 July 2010 8:35:11 pm
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
Thanks
Wednesday 28 July 2010 12:50:27 am
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()
Tuesday 16 November 2010 5:24:33 pm
*bump*
We ran into this problem today. Has this feature been requested yet? If not, I will do so.
An operator will do for the time being... but it should definitely be part of the kernel, or maybe a dedicated 'multi-site boilerplate' extension.
Wednesday 06 April 2011 7:29:55 pm
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?
Wednesday 06 April 2011 11:57:39 pm
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:
{def $clean_path = $node.path_identification_string|explode('_')|implode('-')}
...href="/{$clean-path}"...
obviously a hack, but appears to be working fine.
You must be logged in to post messages in this topic!