MVC Layout: Custom Module and Canonical URLs - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

MVC Layout: Custom Module and Canonical URLs

  • Hello! I have a custom module in my Sitefinity 10.2 project that contains our employee directory. I've made layouts for the MVC list and detail views. I've placed the the widget (default one generated by SF) on Page1. I set the "Detail" view to link to a specific page - Page2, which is a child page of Page1 - dropped the widget on the page and picked the proper template for the detail view. Everything works fine except for the canonical URL on Page2. I was expecting:

    Instead, I'm getting:
    http://www.mydomain/Page1/employee-name - which doesn't function properly since I do not want to show the individual's listing on this page.

    This seems like incorrect behavior to me. Is there a way to get the canonical URL to reflect the actual page the content resides on?



  • You need to set the default location for the content. In the backend go to:

    - Content > Employees

    - In the right column click "Pages where items like this are published" (or if using new UI click the settings icon first top right)

    - Move the page you want as the default location to the top of the page

  • Wow. I never would have thought of that. Feels very unintuitive to me. Thank you!