Quick Nav:  Online Store   |   Login | Register
PrevPrev--NextNext
Filter by paths
Last Post 04 Mar 2010 05:55 AM by Jari Ivanoff. 17 Replies.
Please Register to participate.
Sort: Print topic: Printer Friendly
AuthorMessages
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
24 Feb 2010 08:27 AM
Hi!
I have a site which is going to be localized using Adequation Localization Extensions.
I have made skins for each language and would like to use the menu for it as well.
It is a pretty simple setup with a separate page structure for each language and differences in the url that should make it simple to filter out for the DisplayPath property.

The URL:s look likehttp://www.domain.com/en/Home.aspx and http://www.domain.com/sv/Start.aspx
How do I setup the DisplayPath to only show the pages in the actual structure?
I would like to filter it on the "/en/" or "en/" in the english skin and "/sv/" or "sv/" in the swedish.

I have no real knowledge in Regular Expressions.

/Jari
John Mitchell
Veteran Member
Posts:4350

Avatar

Administrator
Send PM:Send Private Message

--
24 Feb 2010 08:35 AM
Hi Jari,

DisplayPath="/en/" & DisplayPath="/sv/" should work.
John Mitchell
Veteran Member
Posts:4350

Avatar

Administrator
Send PM:Send Private Message

--
24 Feb 2010 08:36 AM
If that is part of the tab structure then you could also use the IncludeTabs setting.

IncludeTabs="/en/" & IncludeTabs="/sv/"
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
24 Feb 2010 08:54 AM
Hi John! It does not work!

I have this structure in the site:

en
..Home
..English About
sv
..Start
..Swedish About
Admin
..SiteSettings
..Pages
.
.

And in the menu I only want to show i.e. pages under en in the English skin and the pages under sv in the Swedish.

I have tried this code in the skin:
<Snapsis:NavMenu runat="server" NavType="Tabs" ExcludeTabs="^//Admin$,^//Host$,^//Värd$" ID="TopMenu" Level="1-1" CacheTabs="False" DisplayPaths="/en/" />

When I set DisplayPaths to "/en/" the menu disappears, if I remove the DisplayPaths property it shows the menu with all pages in that level, including the Admin menu pages (If You are logged in).
I have a testsite set up on http://labb.klover8.se where You can see for Your self.

The Swedish site has with DisplayPaths="/sv/" and the English is without the DisplayPaths property.
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
24 Feb 2010 08:56 AM
No, they are not part of the tab structure, the pages that I want in the tabs are below.
John Mitchell
Veteran Member
Posts:4350

Avatar

Administrator
Send PM:Send Private Message

--
24 Feb 2010 09:08 AM
So there is not a tab named "en" on level 0?

Try setting Level="0-1"
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
25 Feb 2010 05:17 AM
Ahh.. yes of course, there is a tab named "en" on level 0 and one named "sv", but I do not want them visible in the menu. ( Hmm.. but I can always set them to "Do not show in menu" in the page settings.)
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
25 Feb 2010 05:25 AM
Okay, I have tested this now. If I set the "en" page visible in the menu, and Level to 0-1 it works. It only shows the pages in the en structure. But it also shows the "en" page which I do not want visible in the menu since it is only serve as a startingpoint for the structure and is empty. I only want the pages in the level below to be shown. If I have the DisplayPath="/en/" the menu disappears, If I remove it, the menu appears with the EN page visible.

Further testing:

<Snapsis:NavMenu runat="server" NavType="Tabs" ExcludeTabs="^//Admin$,^//Host$,^//Värd$" ID="TopMenu" Level="1-1" CacheTabs="False" DisplayPaths="/en/" />

And

<Snapsis:NavMenu runat="server" NavType="Tabs" ExcludeTabs="^//Admin$,^//Host$,^//Värd$" ID="TopMenu" Level="0-1" CacheTabs="False" DisplayPaths="/en/" />

Result: No Menu at all

<Snapsis:NavMenu runat="server" NavType="Tabs" ExcludeTabs="^//Admin$,^//Host$,^//Värd$" ID="TopMenu" Level="1-1" CacheTabs="False" />

Result: Shows all pages on level 1, from the "en" structure, the "sv" structure and the "Admin" structure (I am logged in as admin, probably would the "Host" pages show as well if I were logged in as Host.)

<Snapsis:NavMenu runat="server" NavType="Tabs" ExcludeTabs="^//Admin$,^//Host$,^//Värd$" ID="TopMenu" Level="0-1" CacheTabs="False" />

Result: Shows the correct structure including the "en" page which I do not want
This is the closest yet.

If I set the "Include in menu" to off on the "en" page, the entire menu disappears, the same thing when I change the privilegies to make it invisible to others than admins on the "en" page.
John Mitchell
Veteran Member
Posts:4350

Avatar

Administrator
Send PM:Send Private Message

--
25 Feb 2010 06:25 AM
This would be easier using a template, but try using Show="ChildrenOnly"
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
25 Feb 2010 07:22 AM
Did not help!
*SIGH* Do I need to make a template then, just to be able to remove the "en" page from the menu? I just want one level of the menu to be displayed as a root menu on the page. DisplayPaths doesn't work at all, setting the Level to 1-1 won't work either..
I got the DNN Nav menu to work but then I have to redo all the CSS and learn how to set it up which is bad since I have an otherwise working menu except for the "en" and "sv" level (Level 0) problem.

Where can I find how to create such a template?
(I have tried to modify the Suckerfish template that came with the package without any success.)
John Mitchell
Veteran Member
Posts:4350

Avatar

Administrator
Send PM:Send Private Message

--
25 Feb 2010 09:38 AM
Ok, this should be possible without a template. Let me set this up in my dev environment and see if I can figure it out.
chris
New Member
Posts:8


Send PM:Send Private Message

--
02 Mar 2010 10:30 AM
What version do you need to have for Paths filter to work. Does not seem to work with version I am currently running. Can't upgrade to new version until figure out what is going on with IE8 and the template type of menu.
John Mitchell
Veteran Member
Posts:4350

Avatar

Administrator
Send PM:Send Private Message

--
02 Mar 2010 06:09 PM
Ok, it appears the problem may have been due to the friendly url rewriter changing the url before the menu could filter on it.

I have attached a new DLL that uses the original url (before rewrite).

Please put this in our /bin folder to test it out.
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
03 Mar 2010 01:52 AM
Okay, I have the developer version, but I only have version 3.4.1, can I use this dll without problems or is there a version 3.4.3 developer package on its way?

/Jari
John Mitchell
Veteran Member
Posts:4350

Avatar

Administrator
Send PM:Send Private Message

--
03 Mar 2010 06:14 AM
Please test this one for me and I'll get you a new developer package to download if it works.
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
03 Mar 2010 08:09 AM
Well... no problems putting the dll into the bin folder. Now I can set DisplayPaths="/en/" and the menu is visible, which it wasn't before. But DisplayPaths only works with Level="0-1" and then the "en" page is visible. If I set Level="1-1" it shows all pages on that level, no matter DisplayPaths.

Here is the current setup which displays the correct path but with the level 0 page which I do not want in the menu:

<Snapsis:NavMenu runat="server" NavType="Tabs" ExcludeTabs="^//Admin$,^//Host$,^//Värd$" ID="NavMenu" Level="0-1" CacheTabs="False" DisplayPaths="/en/" />

Unchecking the "Include in menu" option for the "en" page removes the menu.


BR
Jari
John Mitchell
Veteran Member
Posts:4350

Avatar

Administrator
Send PM:Send Private Message

--
03 Mar 2010 09:40 AM
The DisplayPath setting only turns the menu completely on or off depending on if there is a match in the url.

To only display the pages under the /en parent you will need to use IncludeTabs="//en"

Once you set the IncludeTabs, you should be able to use Level="1-1"
Jari Ivanoff
New Member
Posts:24


Send PM:Send Private Message

--
04 Mar 2010 05:55 AM
THANKS! Now it seems to work as I want!!!
Will You create a 3.4.3 package for me?

Best Regards!
Jari
Please Register to participate.

Active Forums 4.1
     
      
Powered by: Snapsis Software