Removing topnav

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/2/2010 5:36:32 PM
Gravatar
Total Posts 116

Removing topnav

Still playing around with mojo portal and loving though finding some of it a bit of steep learning curve! lol

I have been looking at skins and artisteer and will be buying artisteer soon (will use the affiliate link) and am happy that I can get a skin working fine due to the excellant documentation provided.

However the site I am going to be building is for a small business and will not need the community side of what is provided with mojoportal (such as creating users, managing account, member list etc) and what I really want to do is to remove the topnav section all together.......

To do this I believe that I need to go to the layout.master that is located wwwroot\App_MasterPages in the deployment file and I can remove the whole section in there or I could hide the div in the stylelayout.css file in wwwroot\App_DesignTimesStyle........

However, whilst I can remove topnav and tell the site admins to go onto the site and add /secure/login.aspx do I need to worry about logging out - ask them to go to /Logoff.aspx when they have finished their session?  My other immediate thought is that I would still like to make use of the search function and ideally add it into the menu but this is created dynamically from the pages so is there a way to add it into menu the site creates automagically or will I need to add it as a 'feature' somewhere on the page?  Finally however I go about providing the search function how do I adjust the dropdown list so that either only the "All Content" option is available or even better that that box isn't shown at all but "All Content" is just chosen.  I have looked at the source code and wonder if I can just remove the dropdown ddFeatureList as "All Content" is selected by default??

Having written all of this I am also wondering whether I should consider looking into child sites / multiple sites more as some of the features will not be required.......... indecision

Sorry for asking many questions that should be pretty straight forward really but I guess it all comes down to experiance with using mojoportal..... which I am working on! lol

6/2/2010 8:38:04 PM
Gravatar
Total Posts 2239

Re: Removing topnav

Hello Andy,

For any skinning, including placement or removal of the topnav section, you should NOT modify the \App_MasterPages\layout.master. You should only modify the layout.master in your skin folder (\data\sites\1\skins\YourSkin).

In cases such as yours where you don't want a topnav section, I generally suggest that you include the following in your footer:

<portal:SiteMapLink id="SiteMapLink2" runat="server" CssClass="sitelink" RenderAsListItem="true" />
<portal:UserProfileLink id="UserProfileLink" runat="server" RenderAsListItem="true" />
<portal:LogoutLink id="LogoutLink" runat="server" RenderAsListItem="true" />

The RenderAsListItem value is up to you, it really depends on your site design. I suggest adding these items to the footer so 1) users can get to your SiteMap, 2) Admins can change their password easily or set other profile options and, 3) Admins can logout easily. The UserProfileLink and the LogoutLink will not display to those who are not logged in.

For your Search link, you can create a page and set the URL to http://YourWebSite.Url/SearchResults.aspx.

For the Search Filter box, add the following to your user.config and then open and save your web.config:
<add key="DisableSearchFeatureFilters" value="true" /> 

There really isn't an easy solution for hiding the feature you do not want to use without using Child Sites but I don't necessarily recommend using Child Sites for that reason alone. You can use the Feature Installation tool found in Administration > Advanced Tools to hide individual features from the available features dropdown. The only problem is, these settings will be overwritten when you install any mojoportal updates. You could remove the setup scripts for each feature that you do not want to use from the distribution package AND the site before upgrading your site. These scripts can be found in /Setup/applications.

HTH,
Joe D

6/3/2010 2:23:26 AM
Gravatar
Total Posts 116

Re: Removing topnav

Hi Joe,

HTH? - Absolutely! Thanks for the comprehensive reply there that should save me a lot of frustration! smiley

I had assumed that only the layout.master in the custom skin should be modified but I hadn't found the topnav section when I read through it, I have just looked again and done a search and found it right there!! Ooops!!!  It was very late when I was looking so I'll stick with that ;-)

The tips on the search page will also save me tons of time and it looks like one of those fairly easy to implement when you know how kinda things! 

Thanks also for the info on child sites, I will have a play around with them but might use the features you mention in the advanced tools as a starting point.

Thanks once again for you assistance,

Regards

Andrew

9/6/2012 4:06:39 AM
Gravatar
Total Posts 2

Re: Removing topnav

Hi guys, interesting post.

I`d like to know how to insert a custom link to point to an internal page in between these link for instance:

<portal:SiteMapLink id="SiteMapLink2" runat="server" CssClass="sitelink" RenderAsListItem="true" />
<portal:UserProfileLink id="UserProfileLink" runat="server" RenderAsListItem="true" />

9/6/2012 9:00:12 AM
Gravatar
Total Posts 2239

Re: Removing topnav

Hi,

This will look odd in your layout.master but all you need to do is add a LI and A in between those two controls:

<portal:SiteMapLink id="SiteMapLink2" runat="server" CssClass="sitelink" RenderAsListItem="true" />
<li><a href="/some-page.aspx" title="Some Page">Some Page</a></li>
<portal:UserProfileLink id="UserProfileLink" runat="server" RenderAsListItem="true" />

HTH,
Joe D.

9/7/2012 1:38:34 AM
Gravatar
Total Posts 2

Re: Removing topnav

Thank you Joe for the reply.

I tried that before but instead of the href="/page.aspx" I used the absolute URL and didn`t work.

It`s fine now, I used the same classes for the <li> and <a> elements as the menu uses and works fine.

 

You must sign in to post in the forums. This thread is closed to new posts.