Technical support This forum is closed.
Version 1.x > Technical support > CMSDataList View modes: 
User avatar
Member
Member
aajiz - 6/20/2006 6:37:00 AM
   
CMSDataList
Here is my hierarchy of Page Menu items

-Newsletters
---2006
-----June 2006 Edition
------Articles
---------Article1
---------Article2
------Headlines
---------Headline1
---------Headline2
---------Headline3

I have a CMSDataList with a blank SelectNodePath that retrieves headlines. When placed on a page template for Headilnes, this works fine. However, it does not work when placed on a page template for Articles. My expectation was that it will automatically read the alias path of an article and show a list of headlines for the corresponding edition (2006).

Am I missing something? How to retrieve the list of headlines on article pages?

Related questions are:
1. Is it better to create document templates (EditionContainer, ArticleContainer, HeadlineContainer) or Page Menu items are fine? Any advantages/purposes of one approach over other?

2. When I add another edition (July 2006) and visit the headline and article pages, they come up blank. So, /Newsletters/2006/June-2006.aspx works fine but /Newsletters/2006/July-2006.aspx doesn't work. Any ideas?

I am hoping this question will enlighten the concept of aliaspath, transformations, and user-friendly urls used in KenticoCMS.

User avatar
Guest
admin - 6/22/2006 8:10:51 AM
   
Re: CMSDataList
Hello,

if you want to display a list of headlines on the Articles page, you need to set the CMSDataList.SelectNodesPath property to /Newsletters/2006/June 2006 Edition/Headlines/%.

If you want to do that dynamically, you need to use a code like this:
CMSDataList.SelectNodesPath = Functions.GetPathLevel(GetAliasPath(), 3) + "/Headlines/%";

1. The custom document types allow you to create structured documents with custom fields and it's easier to reuse such content. However, if the Articles and Headlines documents do not contain any special data, I would recommend using Page (menu item) document type for them.

2. Have you created any content (articles, headlines) under the July 2006 section?

Thank you.

Best Regards,