November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
There is a property OpenPages that contains all expanded pages, maybe that could be a start.
Create a method on you itemtemplate to a method that checks this:
if(pageTree.OpenPages.Contains(pageData.PageLink)
{
//your code
}
-Kjetil Simensen
Thanks Kjetil,
Perhaps I am missing something but the logic doesn't seem to work for me. That boolean expression always returns true.
It is on the first load of the page that I want to capture that no item is selected, but even then OpenPages contains currentpage, it looks pretty rudimentary but I am right in thinking if no page in the page tree has been selected the OpenPages.Count property is always 1?
Cheers,
Ian
The container/rootfolder for all the pages in your tree is always in the OpenPages collection.
So you'll need to check if this has a count of 1, or if you have a reference to the container so that you have its page id, you can check if the OpenPages only contains the container/root folder then none are selected.
PS: sorry for bad English, but i wrote it in a hurry :)
- Kjetil simensen
Dear all,
I might be going about this the wrong way but i want to programmatically test if a pageTree has a selected item. Is this possible?
I want to do this, because if none are selected I want to change the css class on the first item to highlight it.
Thanks for your help