Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include pages should have MVC metadata #3

Open
jhorsman opened this issue Mar 24, 2016 · 3 comments
Open

Include pages should have MVC metadata #3

jhorsman opened this issue Mar 24, 2016 · 3 comments

Comments

@jhorsman
Copy link

In DXA the tridion items like component templates and page templates are explicitly wired to MVC metadata like view and region. There is no such explicit configuration for include pages.

Include pages like headers and footers are wired to a region name and view by the page name on the page item in the Content Manager. The page name will be used as the region name and qualified view name. I.e. an include page with name "My-module:Header" will put on the page as region "My-module:Header" and should be rendered with the Header view of the My-module mode. (should because at the moment in DXA 1.3 JAVA include page views are always loaded from the core module).

I see two solutions

  • use a page template for each header; I.e. the _system/includes/header include page in the example DXA content should not use the "Include Page" template, but a "Header Include Page" template. This template can then have the full MVC metadata.
  • set MVC metedata on a page metadata schema for the include page. This does not feel like the perfect solution though because this is mixing module configuration (MVC metadata) and pages.
@rpannekoek
Copy link
Contributor

Assuming that Issue #34 is fixed, what do you see as concrete problem with the current implementation?
The idea is that Include Pages will always be modelled as top-level Regions. We are getting the Region name and (qualified) Region View name from the Page title. What else would be needed?

@jhorsman
Copy link
Author

There are a few concrete problems

  • The page name is directly linked to the region name; That is not what the page name is intended for. Also a user like a site editor cannot change the page title without having unexpected changes in the page.
  • For page templates and component templates the MVC metadata is explicit in template metadata. The behaviour of the include page name is completely different. And not intuitive, it took me quite a while to figure out that the page name plays a role in assigning the region and view.
  • Because explicit MVC metadata is missing I cannot assign a non-standard controller to the region, and at the moment we cannot use custom region views.

@jhorsman jhorsman changed the title Include pages shouldl have MVC metadata Include pages should have MVC metadata Mar 29, 2016
@rpannekoek rpannekoek added this to the v1.5 milestone Apr 5, 2016
@rpannekoek rpannekoek modified the milestones: v1.6, v1.5 Jun 21, 2016
@rpannekoek
Copy link
Contributor

TSI-1494 (internal issue ID for tracking purposes)

@rpannekoek rpannekoek modified the milestones: v1.7, v1.6 Oct 4, 2016
@rpannekoek rpannekoek removed this from the v1.7 milestone Oct 19, 2016
@rpannekoek rpannekoek added this to the v2.2 milestone Dec 18, 2018
@rpannekoek rpannekoek removed this from the v2.2 milestone Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants