Installation and deployment
Version 7.x > Installation and deployment > Master page questions View modes: 
User avatar
Member
Member
pavel.1991-tut - 3/29/2013 10:32:30 AM
   
Master page questions
1) I've done master page template. I appointed this template to root document. I added cmslistmenu web part in this template. Root document has sub sections "about us", "trading" etc. These subsections have sub pages "about us1", "about us2", "trading1", "trading2" etc. I need that cmslistmenu web part show the sub pages of section which is used now. For example, we have next url "mysite.com/trading", so menu must contain sub pages of trading section. And if we have url "mysite.com/about-us", menu must contain sub pages of about-us section. This menu are situated in root document. What should I do that menu show what I described?

2) The root document contains editable text web parts for each section. First editable text web part must be shown for "trading" section only and another one must be shown for "about us" section only, etc. All sections have the same document type. How can I realize described requirement?

User avatar
Member
Member
kentico_sandroj - 3/29/2013 3:06:45 PM
   
RE:Master page questions
Hi Pavel,

Have you tried modifying the path of the CSS List Menu Web part to "./%" - this path tells it to load everything under the currently selected page. So if you are on the About page, you will see About 1, About 2, etc. If you are on the Trading page you will see Trading 1, Trading 2, etc. Is this what you were hoping to accomplish?

On the second issue, you could use a macro condition on the visibility field that evaluates the path and only displays items from a specific path. So on one of the text regions I added this:
{%CurrentDocument.DocumentNamePath.StartsWith("/trade")%}

Those worked for me because I created two pages under the root - about and trade. If I access the trade page I only see text from the Trade text region and vice versa.

In order to determine which path should be used, you could access the CMS_Document table and see what's available under the DocumentNamePath column.

Additionally, you could use the macro debug to see which macros were recently resolved and what the results were: Macro Debug

Please let me know if you need any further clarification.

Best Regards,
Sandro Jankovic