how can i access Page Template Metadata in Page View or _ Layout. I am using SDL Web 8 and DXA 1.5.
I need to add page level class on page views. There are different ways i know to implement this:-
- Different Page Templates with different Page Views in Code: Class will be hard coded in Page View.
Negative:- There will be lot of Page views which are not required.
One Page and Create Metadata for each page to define which page is being used. Use Page metadata to assign class in View. Negative:- control to assign class goes to Editor.
I want to provide Page Template Metadata and create Page Templates for each type of Page. This will be beneficial for me to create Page Types and Content Types Mapping. Also a single General Page Name can be repurposed if I can get the value of the metadata from the Page Template. Also, Editor will not be able to see the metadata. I need help with the third point i.e. how to fetch Page Template Metadata on Page View or Layout.