Aliased Pages - Autonav Breadcrumb trail
Permalink Browser Info Environment
I suspect I am pushing this module to it's limits, but I'm hoping you can offer some help. We have an inventory of products which are just content pages. In order to put the products into categories, we simply create Aliases to the products we need
We need to show the same content on a different domain site. To do this we set the root "/ products" page to allow from all domains, and also added it as an Alias to the domain homepage:
Everything is working as we would expect except the Autonav breadcrumb trail when viewing / sites / Domain B / products / *
* Breadcrumb works for all pages on main domain, including aliases
* Breadcrumb works for all "proper" pages on Domain B
* Breadcrumb works for an Aliased page on Domain B if it's placed under a "proper" page
* Breadcrumb fails when alias is placed directly under Domain B home
Any ideas?
/ products / products / product / ( lots of pages product pages here ) / products / Category X / "A Product" (Alias) / products / Category X / "B Product" (Alias) / products / Category Y / "A Product" (Alias)
We need to show the same content on a different domain site. To do this we set the root "/ products" page to allow from all domains, and also added it as an Alias to the domain homepage:
/ sites / Domain B / sites / Domain B / products (alias of /products)
Everything is working as we would expect except the Autonav breadcrumb trail when viewing / sites / Domain B / products / *
* Breadcrumb works for all pages on main domain, including aliases
* Breadcrumb works for all "proper" pages on Domain B
* Breadcrumb works for an Aliased page on Domain B if it's placed under a "proper" page
* Breadcrumb fails when alias is placed directly under Domain B home
Any ideas?
Type: | Discussion |
---|---|
Status: | Resolved |
Note sure why this has gone down as "Pre Sale" - should be Support Req. - Can't edit
Bumping this - still waiting for response from module dev's...
Hi there,
Thanks for the bump, we haven't got an email notification on this one because of which it has been left unnoticed. I think there were some issues with the emails coming through, they had some filtering issues during the end of last week.
I'll put this under "Discussion" since I don't believe this falls under support.
This is how it's supposed to work internally in concrete5. Basically the sub-pages of your aliased page are not under the alias internally in concrete5. Only the aliased page is in the location where you see it in the sitemap. Because you've allowed the page to be shown from sub-domains, the page you see from under the mapped domain is the original page under its original location. And the breadcrumbs trail is generated based on that location.
I just tested what happens when you add another alias under an existing alias and it does not seem to work. It creates the alias under the original page. That would've been the only easy solution for this one that I can think of.
Other than that, I don't believe there are any ways pass this issue than creating some custom code for it. That's the only solution I can think of. Which means you'll need to create your own auto-nav block (or maybe just "breadcrumbs" block) to solve this.
To implement that, there's few things you'll need to do:
- When checking for all parents in the breadcrumbs trail, under every page, you'll need to check whether it has an alias under the domain that is currently being shown. This is the hardest part and will probably require a custom SQL query.
- If it has an alias under the domain, use that page instead with the follow up recursive call to the parent ID population. Then, it will follow the trail under the location that you'd want.
This is not internally supported in concrete5 because of the fact that you cannot create aliases under aliases and the sub-pages of the aliased pages are not mapped under those aliases. You can test this also with a normal concrete5 installation without Multiple Domains. If you try to access the sub-pages of an aliased page, you'll get a "page not found" error.
Best,
Antti / Mainio
Thanks for the bump, we haven't got an email notification on this one because of which it has been left unnoticed. I think there were some issues with the emails coming through, they had some filtering issues during the end of last week.
I'll put this under "Discussion" since I don't believe this falls under support.
This is how it's supposed to work internally in concrete5. Basically the sub-pages of your aliased page are not under the alias internally in concrete5. Only the aliased page is in the location where you see it in the sitemap. Because you've allowed the page to be shown from sub-domains, the page you see from under the mapped domain is the original page under its original location. And the breadcrumbs trail is generated based on that location.
I just tested what happens when you add another alias under an existing alias and it does not seem to work. It creates the alias under the original page. That would've been the only easy solution for this one that I can think of.
Other than that, I don't believe there are any ways pass this issue than creating some custom code for it. That's the only solution I can think of. Which means you'll need to create your own auto-nav block (or maybe just "breadcrumbs" block) to solve this.
To implement that, there's few things you'll need to do:
- When checking for all parents in the breadcrumbs trail, under every page, you'll need to check whether it has an alias under the domain that is currently being shown. This is the hardest part and will probably require a custom SQL query.
- If it has an alias under the domain, use that page instead with the follow up recursive call to the parent ID population. Then, it will follow the trail under the location that you'd want.
This is not internally supported in concrete5 because of the fact that you cannot create aliases under aliases and the sub-pages of the aliased pages are not mapped under those aliases. You can test this also with a normal concrete5 installation without Multiple Domains. If you try to access the sub-pages of an aliased page, you'll get a "page not found" error.
Best,
Antti / Mainio