Display pages within folder in css menu list

Stephanie Sherriff asked on March 14, 2018 00:16

Hi,

I'd like to be able to group pages in a folder, but have them still appear in the CSS List menu.

For example, I have a Pages structure similar to the below:

Home
News
FOLDER
- Page under folder
Contact

I'd like to have my menu display like this:

Home - News - Page under folder - Contact

Is this at all possible with the default css list menu web part, or am I going to have to just do a custom datasource and repeater? I put a breakpoint in the PreRender for the css list menu, and it seems like that page is actually in the initial datasource results, but at some point is being removed from actual display.

I'm using Kentico 9.

Thanks for your help, Steph

Correct Answer

Trevor Fayas answered on March 14, 2018 13:36

Just as the folder to your page types and add a folder transformation that is nothing but the sub page placeholder tag, should render then!

0 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on March 14, 2018 03:26

All you need is a normal repeater, don't need a data source unless you use the basic repeater. Css list is always a bit limiting.

0 votesVote for this answer Mark as a Correct answer

Stephanie Sherriff answered on March 14, 2018 07:34

Thanks Trevor.

I tried using a normal repeater, then realised I needed to use a hierarchical viewer as I have some pages that have sub pages that I want to display. The unfortunate part seems to be that if I enable loading hierarchical data, any page in a folder now disappears. I can't seem to do both at the same time.

It seems when loading hierarchical data, once the parent isn't displayed, the entire tree isn't displayed.

Yet again, when I debug and view the SQL, the page I want displayed in the menu is included in the query results, but selecting 'Load hierarchical order' makes it disappear.

0 votesVote for this answer Mark as a Correct answer

Stephanie Sherriff answered on March 15, 2018 01:09

Success!

Thanks so much. I created an item transformation for CMS.Folder which is empty, and it works.

Cheers

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.