kentico_borisp
-
11/5/2008 9:20:21 AM
RE:How to get Top Level Page Name from Sub Page
Hello,
You will have to insert some custome code, to get the parent name. You will have to access the parent node and after that get the name of the given node. You can get the parent node with the following snippet: CMS.TreeEngine.TreeNode node = CMS.CMSHelper.TreeHelper.SelectSingleNode(CMS.CMSHelper.CMSContext.CurrentDocument.NodeParentID);
You can access the parent name as follows: node.DocumentName.ToString();
You can also implement a custom macro. You can find a short tutorial in our developer's guide at http://devnet.kentico.com/docs/devguide/appendix_a___macro_expressions.htm.
For your second requirement you can use a repeater and change the visual inheritance of a page in "<selected page> -> properties -> template -> select inherited levels"
I hope this helps.
Best Regards, Boris Pocatko
|