Register
Login
 

Support House of Nuke

  

 House of Nuke Forums  
Subject: Want to keep "Home" page link from showing up in menu...
Prev Next
You are not authorized to post a reply.

Author Messages
vic capronUser is Offline
Novice
Novice
Posts:1

03/27/2008 8:00 PM Alert 

I am using v1.4 of the House Menu.  I have a site with a home page skin and a subpage skin.

On the home page skin, I do not want to show the link for the home page.

I thought that setting ShowHome="False" would fix that, but it doesn't seem to be working.

Below are the properties I have set for my HouseMenu skin object.

id="dnnHOUSEMENU" Scope="-1" ShowHome="False" ShowAdmin="True" IsRecursive="True" Orientation="H" Mode="D" CssElementId="primary-nav"

Everything else about this control is working perfectly.   Please help me keep the home page from showing up in the menu!

Thanks for the free software. 

 

Chris RileyUser is Offline
Novice
Novice
Posts:1

04/23/2008 8:08 AM Alert 

I was also having this problem with a site I was working on.  DNN Version 4.08.00 using the HouseMenu SkinObject (dll version 1.4.1.15333).

Specifically setting ShowHome="false" works if scope is set to "0", but not if scope is set to "-1".  Even If I modify the settings of my home page and un-check display in menu the home link appears in the House menu (but not in any SolpartMenus).

I was able to create a hack to bypass the problem, unfortunately you can only use it if you are skinning in visual studio.

On Page_PreRender run the following code in your skin's codebehind. You may want to wrap in a try catch because it is not bullet-proof.  Code is written in C# (replace HouseMenu1 with the ID of your HouseMenu SkinObject and make sure to include "using System.Xml" ):

foreach (Control thisControl in HouseMenu1.Controls)
{
    if (thisControl != null && thisControl.ID == "litMenu" )
    {
        Literal litMenu = (Literal)thisControl;
        XmlDocument xmlDoc = new XmlDocument();

        //Load the rendered html to a XML document
        xmlDoc.LoadXml(litMenu.Text) ;

        XmlNode HouseMenuNode = xmlDoc.SelectSingleNode("ul" ) ;

        //Grab and remove the first li item under the ul, this should be the home link.
        XmlNode HomeMenuNode = HouseMenuNode.ChildNodesΎ]
        HouseMenuNode.RemoveChild(HomeMenuNode);

        //Reset the text on the housemenu literal
        litMenu.Text = xmlDoc.InnerXml.ToString();
        }
    }
}

Mary Ann GundelUser is Offline
Novice
Novice
Posts:3

02/12/2010 12:35 PM Alert 
The ShowHome attribute did not work for me either. I added this to my skin.css file to hide the Home menu item:

li#HouseMenuNavItemHome,
li#HouseMenuNavItemHome a
{ display: none; }

For the home page, Page Settings->Page Details->Page Name must be 'Home' (no quotes).

Note: Search engines consider hidden links to be suspicious, so this may slightly reduce your site's ranking.
You are not authorized to post a reply.
Forums > House Modules > HouseMenu 1.x > Want to keep "Home" page link from showing up in menu...



ActiveForums 3.6
  

Terms Of Use  |  Privacy Statement
Copyright © 2006-2008 by Avastone Technologies. All rights reserved.