17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1210 Views |
-
problem in code: hide sidebar in only one page

13 November 2008 at 10:25pm
hi!
I try to hide sidebar in only onde page. Sidebar show, at right, the second level menu, for that page. In ArticleHolder page I want hide this second level menu. So I try to do in this way, but someting is wrong, can you help me?
I want underline that in brackets I put "ArticleHolder": this is the name of "ArticleHolder.php" file, not the url oh page that is "result"<div id="sidebar" >
<% if Page(ArticleHolder)%>
<% if Menu(2) %>
<div class="sidebox">empty</div>
<% end_if %>
<% else %>
<% if Menu(2) %>
<div class="sidebox">
<h1 class="clear"><% control Level(1) %>
$Title
<% end_control %>
</h1>
<ul class="sidemenu">
<% control Menu(2) %>
<li><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode<% if First %> top<% end_if %>"><span>$MenuTitle</span></a></li>
<% end_control %>
</ul>
</div>
<% end_if %>
<% end_if %>
</div> -
Re: problem in code: hide sidebar in only one page

14 November 2008 at 6:41am
Use either <% if InSection(page-url) %> to check the specific page, or if you want to check for all page types, use <% if ClassName = ArticleHolder %> - this would return true for every page that uses article holder.
-
Re: problem in code: hide sidebar in only one page

14 November 2008 at 8:35pm
Thanks, I try your solution with Classname and it's ok!
| 1210 Views | ||
|
Page:
1
|
Go to Top |


