Sign In  |  Register
 
 DotNetNuke Powered!
DotNetNuke Support Forums

Modified Links Skin Object

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
eclayf
Posts:19



10/09/2007 6:06 PM  

Hi John,

I have a question about using a modified version of the Core Links Skin object.  I renamed it "mLinks" and renamed the ascx.vb file to match.  Then I modified the "inherits" statement in the (new) mLinks.ascx file to inherit from the (new) mLinks.ascx.vb file.  This part was extremely simple.

Next, I modified the following line to draw only "hidden" pages to display in the menu.

<br/>
If objTab.IsVisible = True And objTab.IsDeleted = False And objTab.DisableLink = False Then<br/>

Modified it to this:

<br/>
If objTab.DisableLink = False AND objTab.IsVisible = False AND objTab.IsDeleted = False Then<br/>

Originally I had modified it to require "DisableLink = True" so I could still hide pages, but 4.5.5 made that impossible because disabled links now redirect to the home page.  So I had to go this way, and it means that to "hide" a page I have to create a "hidden" page under a "hidden" AND "disabled" page.  That way none of the the hidden page won't show up in the Links Menu and all hidden children remain invisible as well.

Here is what I would like to do.  I would like to use sort of a "reserved names" function.  My way of viewing this is that I should be able to use the "tabname" in the statement to create a list of tabnames that when marked as "IsVisible = False" they would show up in the (new) mLinks skin object.

Hope this makes sense.  I know that in SQL I can set a string of variables so that if A, and b, or c, or d, or e, or f, then...

This way if a page whose (now reserved) name appeared as "hidden" it would show up in the (new) mLinks skin object.  This would allow me to have a "second" skinnable menu in a site that would skin exactly like Solpart, or any of the other "Core" menu objects.

I tried to modify this, but my level of skill just isn't up to it and I couldn't get the new modification to work using the string of tabnames I needed.

I have included the .zip of the mLinks skin object for you to look at, if you are inclined to, and I totally understand if you don't have the time.

If anyone wants to use the object, feel free.  It has made for some very clean looking skins.  To "register" it in a skin use the following code:


<%@ Register TagPrefix="dnn" TagName="MLINKS" Src="~/DesktopModules/MLINKS/MLINKS.ascx" %>

To implement the object in the skin:



Then to have a page show up in the menu, simply mark it "hidden."  Or in the new versions of DNN, 4.5 and higher, uncheck the box to make the page "show in menu."  Remember you will have to then create a "hidden" page that is both "hidden" AND "disabled" to be able to hide pages by designating them as children of the main "hidden and disabled" page.

Clay


Attachment: MLINKS.zip

John Mitchell
Posts:3353



10/11/2007 9:10 AM  
Hi Clay,

I can't really follow what it is that you want to do different. What you are doing sounds a lot like my CSS NavMenu. I have been thinking about creating a template for my CSS NavMenu that will use the Solpart CSS classes so it could be a direct replacement, but haven't got to that yet.
I also have a free NavList skin object that outputs a drop-down list for navigation.
eclayf
Posts:19



10/11/2007 1:27 PM  

The original Links object displays pages by level "root," "child," "Parent" etc. but not if they are marked "hidden."  I modified the original statement in ascx.vb to require a page to be hidden AND disabled for the mLinks object to display it.  That was the original change.  The second change was to remove the "disabled" requirement because of the new (in 4.5) redirect funciton on disabled pages but the page still had to be a "hidden" page to show up in the mLinks object.  All of this allowed me to "move" an object from the left menu, to the mLinks menu by simply marking the item "hidden."

Hope that all makes sense now.  The attempt was to modify links.ascx.vb so I could have another "root level" menu that displayed pages in  a different place on the page.

What I am trying to do now is to create sort of a "reserved name" for several pages.  If NO pages are named according to the "reserved names" the menu does not dispaly a thing.  If a page is re-named to a reserved name, then it will appear in the menu.

In short, withouth ever touching the skin, or the menu I would be able to add or delete pages by simply renaming them.  This would require that the ascx.vb file have in it's "If Then" statement, a list of acceptable reserved page names. if that page is then marked hidden, AND named by the reserved name, it would appear in the mLinks menu and NOT in the solpart, or Dnn, or Nav or any other menu not set to display hidden pages.

I hope I did a better job of explaining it this time.

Clay

John Mitchell
Posts:3353



10/11/2007 1:37 PM  
Ok, I understand what you are doing, my CSS NavMenu and Simple NavList also do this. I have properties on them for IncludeTabs and ExcludeTabs that compare the name of the tab using Regex and then decide if they should be shown or not.

eclayf
Posts:19



10/11/2007 3:47 PM  

What I want to do is similar, but slightly different.  I don't want a property set in the Skin that does it externally.  I want to set those names directly in the mLinks.ascx.vb file.  Then all I have to do is to set a page with that name as "hidden" and it will "move" from the left menu to the mLinks menu.  Doing it this way, it could be "moved" by only changing the page "hidden" setting in the Pate Settings area of a Tab.

Hope that makes sense.

Clay

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

Forums >DotNetNuke Support >General-DNN-Help > Modified Links Skin Object



ActiveForums 3.7
Visit our Store for great DotNetNuke Modules and Skins
DNNMasters Sitemap/Google Sitemap 3.0

Item codeSM3-01
Price$29.00
Product Information 
DotNetNuke CSS NavMenu 3.3 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
Snapsis PageBlaster 3.3.2 for DotNetNuke - Professional Edition

AuthorJohn Mitchell
Base Price$79.00
Product Information 
XDAkuna (Web 2.0 CSS XHTML Skin)

Item codeXDAkuna
AuthorNina Meiers
Price$49.00
Product Information