Resolve pages from a sub section in the tree in combination with a domain alias

Dražen Janjiček asked on July 12, 2018 09:56

Hi,

Our client wants to setup campaign "sub-sites" within the content tree of the main website, in combination with a domain alias that points to one of these sub sections. That's all fine, but now I wonder how I tell Kentico to resolve the correct page.

For instance, the main website has a /privacy-policy page, the campaign section has one as well. When I browse to mycampaign.com/privacy-policy I get the privacy policy page of the main domain. mycampaign.com however resolves correctly (due to the Default alias path set for the domain alias).

Do I have to configure something in order to get the correct page? Wouldn't Kentico figure it out on its own?

Thanks for any help!

Best regards, Drazen

Recent Answers


Jan Hermann answered on July 12, 2018 10:07

You can't have same page alias for two different pages, so the second policy page needs to have some other url like mycampaign.com/subsite/privacy-policy or mycampaign.com/privacy-policy-subsite.

0 votesVote for this answer Mark as a Correct answer

Dražen Janjiček answered on July 12, 2018 10:23

Thanks Jan, that makes sense. Does Kentico allow overriding the default page resolving mechanism? Then I could figure it out easily.

0 votesVote for this answer Mark as a Correct answer

Jan Hermann answered on July 12, 2018 10:26

If you go to that page -> Properties -> URLs you can enter any path you want that page to have into the Path or pattern property. Don't forget to remove the page alias it creates when you add a new path.

0 votesVote for this answer Mark as a Correct answer

Dražen Janjiček answered on July 12, 2018 10:39

Sorry, not sure I can follow. In my subsite, I create a page called "privacy-policy-subsite". Then I go to the Url settings and add a custom path to /privacy-policy. This doesn't create a new page alias, so I don't have to remove it. Then, when I browse to mycampaign.com/privacy-policy, it still shows the main privacy policy page.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.