Quick Nav:  Online Store   |   Login | Register

Using ExcludeTabs and IncludeTabs

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
koolworld
<50 Posts
Posts:40


08/21/2008 10:08 AM  

Hi John,

I'm having problems getting the ExcludeTabs and IncludeTabs working correctly for some reason (v3.3.0.0) - looking through the forum there seems to be different suggestions but none seem to work all the time.

I am using a template type menu:

           DisplayIcon="false"
           Level="1-5" Type="Template" TemplateFile="Snapsis.NavMenu.LeftVertMenu.template"
           OnlyExpandActive="true"
           ExcludeTabs="Admin,Host" IncludeTabs="^Highlands End$"  runat="server" CacheTabs="false" />

I want this menu to display all child pages under the tab named "Highlands End" which it does do, but another page "Accommodation"->"Highlands End" is also being shown in the menu but that page belongs to the level 0 tab "Accommodation"

I think i want to tell the menu to only show tabs under "Parks"->"Highlands End" but my current IncludeTabs syntax is picking out all tabs and children called "Highlands End".

I've also tried excluding certain pages from the menu without any success so i am confused as to whether the syntax has changed?

Thanks in adance.

Dan

John Mitchell
Posts:3478


08/21/2008 10:21 AM  

Hi Dan,

I added a new way to do what you are wanting in version 3.1 or 3.2.

The IncludeTabs and ExcludeTabs now use the tabpath to compare to.

If you put IncludeTabs="//Parks//Highlands End" it should include only that one.

koolworld
<50 Posts
Posts:40


08/21/2008 10:38 AM  

Hi John, i've tried that and it doesn't display anything - i've tried removing the spaces and still no luck. I'm using a template type for this menu, does that change anything?

John Mitchell
Posts:3478


08/21/2008 12:16 PM  
Try with ExcludeTabs=".*" and IncludeTabs="//Parks//Highlands"

The Highlands End tab is directly below the Parks one right?
koolworld
<50 Posts
Posts:40


08/21/2008 1:07 PM  

Still no success with that. The TabPath in the DB is //Parks//HighlandsEnd

koolworld
<50 Posts
Posts:40


08/22/2008 9:49 AM  

Hi John, sorry to keep bothering you but i am still not getting this menu to work correct using the suggested IncludeTabs syntax.

John Mitchell
Posts:3478


08/22/2008 10:23 AM  
I just tried this locally and it works.
Maybe it is the OnlyExpandActive="true" setting. Try removing that or setting it to false.

Also try placing {Tab.TabPath} in your template somewhere like the title attibute of the anchor so you can see how that is coming out.

You could also use the original settings you posted, but put accommodations in the excludeTabs:

ExcludeTabs="Admin,Host,Accommodations" IncludeTabs="^Highlands End$" runat="server" CacheTabs="false" />
John Mitchell
Posts:3478


08/22/2008 10:31 AM  
Now that I think about it, that last recommendation just made me realize something which I have confirmed in the code.

The ExcludeTabs uses the TabPath, but the IncludeTabs uses the TabName, which explains what is going on here. I was wondering how your IncludeTabs="^Highlands End$" was working with the space since the tabpath does not have spaces.
That last recommendation should work.

Sorry for the confusion. Having the Exclude use the TabPath and the Include use the TabName is probably the best way to get the most flexibility out of it, but I need to remember that it works that way.
koolworld
<50 Posts
Posts:40


08/22/2008 10:50 AM  

Hi, thanks for the update.

I have reverted back to

IncludeTabs="^Highlands End$"
ExcludeTabs="^//Parks//HighlandsEnd//Accommodation$"

I'm trying to exclude this page from the menu but whatever i try i cannot get a page excluded. I have also tried viewing the TabPath but {Tab.TabPath} does not get parsed.

John Mitchell
Posts:3478


08/22/2008 11:24 AM  
The excludePath you put in there has the Accommodation tab under the Highlands End tab, but in the original post you said it was the other way around. If you just exclude the word Accommodation it will exclude any tabpath with that word in it.

koolworld
<50 Posts
Posts:40


08/25/2008 11:28 AM  

I was just testing with various tabs to try and exclude them from the list but nothing seems to work in ExcludeTabs - i would really like to try and get this resolved. You mentionded that Tab.TabPath should display the path but it doesn't get parsed so i am wondering if the dev version i have is not the latest version?

thanks.

John Mitchell
Posts:3478


08/25/2008 12:12 PM  
Hi Dan,
I just sent you the latest DLL.
koolworld
<50 Posts
Posts:40


08/26/2008 2:37 AM  
Hi John, having better success with this one. But experimenting with it shows that i cannot seem to exclude any pages 3 levels down, i.e.

ExcludeTabs="^//Parks//HighlandsEnd//Links$" IncludeTabs=""

I am showing all pages in the menu now and just want to exclude the Links page but it always shows up. I have tried this with several level 3 pages without success.
John Mitchell
Posts:3478


08/26/2008 8:28 AM  
I'm not sure why it wouldn't work, but if you don't have any another pages with the word "Links" in it then you could just use that, or some other shorter ExcludeTab setting.

ExcludeTabs="Links" or maybe ExcludeTabs="HighlandsEnd//Links"



Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >CSS NavMenu > Using ExcludeTabs and IncludeTabs



ActiveForums 3.7
Powered by: Snapsis Software