How do I remove something from my template?

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
4/25/2012 3:31:19 PM
JJ
Gravatar
Total Posts 10

How do I remove something from my template?

When I add an html fragment to my left column, it always brings back a list of any subpages above my fragment. 

 

You can see what I mean on this url: http://kidscourtsc.com.green.mysitehosted.com/policies-and-forms.aspx

I followed the directions on the artisteer page, but it breaks my whole template if I comment out the section mentioned.

Any help would be greatly appreciated!

Thanks,

JJ

4/25/2012 4:42:22 PM
Gravatar
Total Posts 42

Re: How do I remove something from my template?

If I understood correctly you would like to remove the vertical menu from the layout.

If so, you have to open the "layout.master" which is placed in the "/Data/Sites/1/Skins/[yourskinname]/" directory

find the place where the vertical menu control is placed - it should look like:

<asp:Panel ID="divLeft" runat="server" CssClass="art-layout-cell art-sidebar1 leftside"
Visible="True" SkinID="pnlPlain">
<portal:PageMenu ID="PageMenu1" runat="server" UseTreeView="true" IsSubMenu="true"
TreeViewShowExpandCollapse="false" />
<asp:ContentPlaceHolder ID="leftContent" runat="server">
</asp:ContentPlaceHolder>
</asp:Panel>

and remove the bolded part

4/25/2012 7:30:54 PM
JJ
Gravatar
Total Posts 10

Re: How do I remove something from my template?

Thanks very much.  I swear I've done that before, and it messed up my whole layout, or even broken the site. 

 

Much appreciated!

4/26/2012 9:18:13 AM
Gravatar
Total Posts 18439

Re: How do I remove something from my template?

Probably the problems were caused by commenting things out rather than removing them. If you make the slightest mistake in layout.master it will fail to load, log the error in the mojoportal log and fall back to loading a failsafe master page to keep from crashing the site completely (though it can crash the design since the failsafe one doesn't have the same stuff as your custom design).

For server controls you cannot comment them out with html comment syntax.

For example this is html comment syntax, it can be used to comment out raw html

<!--
<a href="http://somesite.com">Link to Some site</a>
-->

This is comment syntax to comment out a server control:

<%--
<portal:PageMenu ID="PageMenu1" runat="server" UseTreeView="true" IsSubMenu="true"
TreeViewShowExpandCollapse="false" />
--%>

If you try to comment a server control with html comment syntax it will cause an error. Though in layout.master you can comment out raw html using the server syntax. One advatage of using the server syntax to comment out html is that it won't be rendered whereas if you comment out html with html comment syntax you can still see it viewing the source of the page.

Hope that helps,

Joe

4/26/2012 10:57:22 AM
JJ
Gravatar
Total Posts 10

Re: How do I remove something from my template?

That's where I blew it.  I commented out <% %>.  I forgot the -- on both ends. 

Thanks Joe.  If you're bored and want to answer my other thread, that'd be awesome:)

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