Page 1 of 1

menu problems (wacked up urls)

Posted: Thu Jul 27, 2006 2:16 am
by lleighh
I'm not sure what went wrong.  This is the third time I've used CMSMS for differnt clients and the third time has been very trying.  I'm using a template (with horizontal dropdown menus) that I downloaded from sourceforge.

Here's the link http://heartsandhandsforhaiti.org/ ... when you click on a menu item, you get a 404 error and a wacky url (for example ... http://heartsandhandsforhaiti.org/index ... tent_types ).  When I take the 'index.php' out of the address I still get a 404.

I check'd the menu manager but none of the stuff about nodes makes sense.  Can someone demystify it for me?  Thanks.

Page Template code here ...

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<__html>
{global_content name='JavaScript for IE page width'}
<head>
<!--[if IE]>
<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
<![endif]-->
<!-- Type the title of your site here -->
<title>Hearts and Hands for Haiti - {title}</title>

{metadata}
{stylesheet}

{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
<__script__ src="uploads/javascript/sucker.js"></__script>
{global_content name='JavaScript for IE page width'}
</head>

</__body>

<div id="pagewrapper">
<div id="container">

    <!-- start accessibility skip links -->
    <ul class="accessibility">
      <li><a href="#menu_vert" accesskey="1" title="Skip to navigation">Skip to navigation</a></li>
      <li>{cms_selflink anchorlink='main' dir='anchor' text='Skip to content'}</li>
    </ul>
    <!-- end accessibility skip links -->

    <hr />


   <!-- Start Header, with logo image that links to the default start page -->
   <div id="header" class="clearfix">
           <h1>{cms_selflink dir="start"}</h1>
   <hr />
   </div>
   <!-- End Header -->


      <!-- Start Horizontal Menu -->
      <div id="menu_horiz">
         <h2 class="accessibility">Main Navigation</h2>
         <div id="wrapper">
         {cms_module module='menumanager' template='Horizontal_dropdown : my_nav'  }
         </div>
      </div><!-- end topnav -->
      <!-- End Horizontal Menu -->

 <!-- Start sub nav -->
   <div class="subnav"></div>
   <!-- End sub nav -->
   

<!-- Start Breadcrumbs -->
   <div class="breadcrumbs">
        {breadcrumbs starttext='.:' root='Home' delimiter='»'}<br>

<hr />
   </div>
   <!-- End Breadcrumbs -->


   <!-- Start Content (Navigation and Content columns) -->
   <div id="content" class="clearfix">

      <!-- Start Sub Navigation -->
      <!-- <div id="menu_vert">
         <h2 class="accessibility">Sub Navigation</h2>
         {cms_module module='menumanager' template='Horizontal_dropdown : ellnav-accessible'   start_level='2' collapse='1'}
      <hr />
      </div> -->
      <!-- End Sub Navigation -->


      <!-- Start Content Area -->
      <div id="main">

         {content} <br />

         

      
      </div>
      <!-- End Content Area -->


      <!-- Start Second Content Block -->
      <div id="content2">

         {content block='block1'}
<hr>
          <center><p>Hearts and Hands for Haiti<br>

2013 Midwood Drive<br>
Raleigh NC 27604<br>
Phone: 919-836-1929<br>
<a href="mailto:stan@heartsandhandsforhaiti.org">Contact HHH</a>
</p></center>
      </div>
      <!-- End Second Content Block -->


   </div>
   <!-- End Content -->


   <!-- Start Footer -->
   <div id="footer" class="clearfix">
      {global_content name='footer'}
   </div>
   <!-- End Footer -->


</div><!-- end container -->
</div><!-- end pagewrapper -->


<__body>
</__html>

Menu Template from menu manager ...

Code: Select all

{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page. Used both for the horizontal main menu and the top level in the vertical submenu.
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable. 
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. Also used for the horizontal <ul> to use the entire width of the block element that it is wrapped in. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
hr.separator - To style the ruler for the separator *} 
{if $count > 0}
<ul class="clearfix" id="nav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}

{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->current == true && $node->depth == 1}
<li class="active0{$node->depth}"><dfn>{$node->hierarchy}: </dfn><h3>{$node->menutext}</h3>
{elseif $node->current == true && $node->depth > 1}
<li class="active0{$node->depth-1}"><dfn>{$node->hierarchy}: </dfn><h3 class="clearfix">{$node->menutext}</h3>
{elseif $node->parent == true && (($node->depth == 1) or ($node->depth == 2))}
<li class="activeparent"><a href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><h3 class="clearfix">{$node->menutext}</h3>{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"><hr class="clearfix" />
{else}
<li><a href="{$node->url}" {if $node->accesskey != ''}accesskey="{$node->accesskey}" {/if}{if $node->tabindex != ''}tabindex="{$node->tabindex}" {/if}{if $node->titleattribute != ''}title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}: </dfn>{$node->menutext}</a>{/if}
{/foreach}

{repeat string="</li></ul>" times=$node->depth-2}</li>
</ul>
{/if}

Re: menu problems (wacked up urls)

Posted: Thu Jul 27, 2006 2:38 am
by Dr.CSS
It's not the menu manager, you have to check the config.php if you try this link it works.

http://heartsandhandsforhaiti.org/index ... tent_types

as does.

http://heartsandhandsforhaiti.org/index ... e=calendar

And in case you didn't notice your second level menu is unusable that far down the page, I think you can just delete that call for the second menu it should work.

Re: menu problems (wacked up urls)

Posted: Thu Jul 27, 2006 4:15 am
by Elijah Lofgren
lleighh wrote: I'm not sure what went wrong.  This is the third time I've used CMSMS for differnt clients and the third time has been very trying.  I'm using a template (with horizontal dropdown menus) that I downloaded from sourceforge.

Here's the link http://heartsandhandsforhaiti.org/ ... when you click on a menu item, you get a 404 error and a wacky url (for example ... http://heartsandhandsforhaiti.org/index ... tent_types ).  When I take the 'index.php' out of the address I still get a 404.
You're probably on a Windows host.
See: http://forum.cmsmadesimple.org/index.ph ... l#msg30261

Hope this helps,

Elijah

Re: menu problems (wacked up urls)

Posted: Thu Jul 27, 2006 6:44 am
by Dr.CSS
I've checked into that template and found that the problem with the menu appearing to be split is that is has no CSS for more than 2 levels if you have more than that you will have to add CSS for the 3rd level and a 4th one if you will have that many.

Basically just duplicate the second level CSS and add ul or li to the end of the calls.

Re: menu problems (wacked up urls)

Posted: Thu Jul 27, 2006 11:19 am
by lleighh
Hey, Mark, thanks for your advice about the config.php.  I turned off the pretty urls and it now works fine.  I shoulda posted my problem yesterday morning ... wouldve saved a lot of time.  Tahnks again.

BTW, Elijah, I'm on a linux host.

Re: menu problems (wacked up urls)

Posted: Thu Jul 27, 2006 1:37 pm
by lleighh
I thought I could make the submenu (two levels needed only) work on my own but i can't.  i made changes to the css and template (as suggested by mark) but maybe i'm just not following you.  take a look below.

template code ...

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<__html>
{global_content name='JavaScript for IE page width'}
<head>
<!--[if IE]>
<__script__ type="text/javascript" src="modules/MenuManager/CSSMenu.js"></__script>
<![endif]-->
<!-- Type the title of your site here -->
<title>Hearts and Hands for Haiti - {title}</title>

{metadata}
{stylesheet}

{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
<__script__ src="uploads/javascript/sucker.js"></__script>
{global_content name='JavaScript for IE page width'}
</head>

</__body>

<div id="pagewrapper">
<div id="container">

    <!-- start accessibility skip links -->
    <ul class="accessibility">
      <li><a href="#menu_vert" accesskey="1" title="Skip to navigation">Skip to navigation</a></li>
      <li>{cms_selflink anchorlink='main' dir='anchor' text='Skip to content'}</li>
    </ul>
    <!-- end accessibility skip links -->

    <hr />


   <!-- Start Header, with logo image that links to the default start page -->
   <div id="header" class="clearfix">
           <h1>{cms_selflink dir="start"}</h1>
   <hr />
   </div>
   <!-- End Header -->


      <!-- Start Horizontal Menu -->
      <div id="menu_horiz">
         <h2 class="accessibility">Main Navigation</h2>
         <div id="wrapper">
         {cms_module module='menumanager' template='Horizontal_dropdown : my_nav'}
         </div>
      </div><!-- end topnav -->
      <!-- End Horizontal Menu -->

 <!-- Start sub nav -->
   <div class="subnav"></div>
   <!-- End sub nav -->
   

<!-- Start Breadcrumbs -->
   <div class="breadcrumbs">
        {breadcrumbs starttext='.:' root='Home' delimiter='»'}<br>

<hr />
   </div>
   <!-- End Breadcrumbs -->


   <!-- Start Content (Navigation and Content columns) -->
   <div id="content" class="clearfix">

      <!-- Start Sub Navigation -->
      <!-- <div id="menu_horiz">
         <h2 class="accessibility">Sub Navigation</h2>
         {cms_module module='menumanager' template='Horizontal_dropdown : my_nav'   start_level='1' collapse='1'}
      <hr />
      </div> -->
      <!-- End Sub Navigation -->


      <!-- Start Content Area -->
      <div id="main">

         {content} <br />

         

      
      </div>
      <!-- End Content Area -->


      <!-- Start Second Content Block -->
      <div id="content2">

         {content block='block1'}
<hr>
          <center><p>Hearts and Hands for Haiti<br>

2013 Midwood Drive<br>
Raleigh NC 27604<br>
Phone: 919-836-1929<br>
<a href="mailto:stan@heartsandhandsforhaiti.org">Contact HHH</a>
</p></center>
      </div>
      <!-- End Second Content Block -->


   </div>
   <!-- End Content -->


   <!-- Start Footer -->
   <div id="footer" class="clearfix">
      {global_content name='footer'}
   </div>
   <!-- End Footer -->


</div><!-- end container -->
</div><!-- end pagewrapper -->


<__body>
</__html>
 

css

Code: Select all

/* A CSS Framework by Mike Stenhouse of Content with Style, adapted to CMSMS by Daniel Westergren */

/* NAV */

    * html div#menu_horiz {
        /* hide ie/mac \*/
        height: 1%;
        /* end hide */
    }
    div#menu_horiz {
      width: 780px;
      margin: 0;
      text-align: center;
      border-right: solid 1px #cccccc;
    }
    div#menu_horiz ul {    
        margin: 0;
        padding: 0;
        list-style: none;
        border-left:  1px solid #C0C0C0;
        
div#menu_horiz ul li {
      background-color: #000;
       
    }
    div#menu_horiz li {
        float: left;
        display: inline;
        list-style: none;
        margin: 0 ;
        border-right: 1px solid #C0C0C0;

}


    }
    div#menu_horiz li a {
        border-right: none;
    }
    div#menu_horiz a,
    div#menu_horiz a:link,
    div#menu_horiz a:active,
    div#menu_horiz a:visited {
        display: block;
        padding: 5px 10px; 

        /* hide from ie/mac \*/
        display: block;
        /* end hide */
        background:  url(uploads/Horizontal_dropdown/nav_bg.jpg) repeat 0 0px; 
        text-decoration: none;
        margin: 0;
        color: #18507C;
        /*background: #F68F3A;*/
         font-weight: bold;
    }
div#menu_horiz li a:hover {
        background:  url(uploads/Horizontal_dropdown/nav_hover_bg.jpg) repeat 0 0px;
	background-color: #D10D40;
        color: #FFF;
        line-height: 1em;
        font-weight: bold;
}


    div#menu_horiz .activeparent {
        display: inline-block;

        /* hide from ie/mac \*/
        display: block;
        /* end hide */
        
	background-color: #D10D40;
    }

    div#menu_horiz .current a,
    div#menu_horiz .current a:link,
    div#menu_horiz .current a:active,
    div#menu_horiz .current a:visited,
    div#menu_horiz .current a:hover,
    div#menu_horiz .activeparent a,
    div#menu_horiz .activeparent a:link,
    div#menu_horiz .activeparent a:active,
    div#menu_horiz .activeparent a:visited,
    div#menu_horiz .activeparent a:hover 
{
	background-color: #D10D40;
    }

/*SECOND LEVEL for horiz menu*/
    * html div#menu_horiz {
        /* hide ie/mac \*/
        height: 1%;
        /* end hide */
    }
    div#menu_horiz {
      width: 780px;
      margin: 0;
      text-align: center;
      border-right: solid 1px #cccccc;
    }
    div#menu_horiz ul ul{    
        margin: 0;
        padding: 0;
        list-style: none;
        border-left:  1px solid #C0C0C0;
        
div#menu_horiz ul ul li{
      background-color: #000;
       
    }
    div#menu_horiz li li{
        float: left;
        display: inline;
        list-style: none;
        margin: 0 ;
        border-right: 1px solid #C0C0C0;
}

    div#menu_horiz li li a {
        border-right: none;
    }
    div#menu_horiz a,
    div#menu_horiz a:link,
    div#menu_horiz a:active,
    div#menu_horiz a:visited {
        display: block;
        padding: 5px 10px; 

        /* hide from ie/mac \*/
        display: block;
        /* end hide */
        background:  url(uploads/Horizontal_dropdown/nav_bg.jpg) repeat 0 0px; 
        text-decoration: none;
        margin: 0;
        color: #18507C;
        /*background: #F68F3A;*/
         font-weight: bold;
    }
div#menu_horiz li li a:hover {
        background:  url(uploads/Horizontal_dropdown/nav_hover_bg.jpg) repeat 0 0px;
	background-color: #D10D40;
        color: #FFF;
        line-height: 1em;
        font-weight: bold;
}


    div#menu_horiz .activeparent {
        display: inline-block;

        /* hide from ie/mac \*/
        display: block;
        /* end hide */
        
	background-color: #D10D40;
    }

    div#menu_horiz .current a,
    div#menu_horiz .current a:link,
    div#menu_horiz .current a:active,
    div#menu_horiz .current a:visited,
    div#menu_horiz .current a:hover,
    div#menu_horiz .activeparent a,
    div#menu_horiz .activeparent a:link,
    div#menu_horiz .activeparent a:active,
    div#menu_horiz .activeparent a:visited,
    div#menu_horiz .activeparent a:hover 
{
	background-color: #D10D40;
    }




/* END NAV */

div#menu_horiz li.active01 h3 {
        display: inline-block;
        padding: 5px 10px; 
        background:  url(uploads/Horizontal_dropdown/nav_hover_bg.jpg) repeat 0 0px;
        /* hide from ie/mac \*/
        display: block;
        /* end hide */
        font-size: 1em;
        line-height: 1em;
        text-decoration: none;
        margin: 0;
        color: #ffffff;
        background-color: #D10D40;
    }

#menu_horiz li.active02 h3 {
  display: block;
  text-decoration: none;
  padding: 5px 5px 5px 10px;
  font-weight: normal;
  color: #18507C;
  margin: 0;
  font-size: 1em;
  background-color: #D10D40;
  }

#menu_horiz li.active03 h3
{
  display: block;
  padding: 3px 5px 3px 25px;
  border-bottom: none;
  font-size: 90%;
  font-weight: bold;
  color: #D10D40;
  margin: 0;
}

div#menu_horiz li li.active01 h3 {
        display: inline-block;
        padding: 5px 10px; 
        background:  url(uploads/Horizontal_dropdown/nav_hover_bg.jpg) repeat 0 0px;
        /* hide from ie/mac \*/
        display: block;
        /* end hide */
        font-size: 1em;
        line-height: 1em;
        text-decoration: none;
        margin: 0;
        color: #ffffff;
        background-color: #D10D40;
    }

#menu_horiz li li.active02 h3 {
  display: block;
  text-decoration: none;
  padding: 5px 5px 5px 10px;
  font-weight: normal;
  color: #18507C;
  margin: 0;
  font-size: 1em;
  background-color: #D10D40;
  }

#menu_horiz li li.active03 h3
{
  display: block;
  padding: 3px 5px 3px 25px;
  border-bottom: none;
  font-size: 90%;
  font-weight: bold;
  color: #D10D40;
  margin: 0;
}

Re: menu problems (wacked up urls)

Posted: Thu Jul 27, 2006 1:53 pm
by Dr.CSS
if you only need 2 levels as in

1. home
1.1 page

2. page1
2.1 page
2.2 page

3. page2
3.1 page
3.2 page
3.3page

4. page3

etc.    then in your template {cms_module module='menumanager' template='Horizontal_dropdown : my_nav' number_of_levels='2'}

it's easier to just put your pages only 2 levels deep eg,. just put your pages as 1 under your mains, under page1, or page2 or page3

EDIT: and put your CSS back the way it was.

Re: menu problems (wacked up urls)

Posted: Thu Jul 27, 2006 10:29 pm
by lleighh
thanks, mark.  works like a charm in FF and NN.  IE on the other hand is still not giving me any love, even with the special header text that I found this from an earlier post: 

I also have this in the template head ... {global_content name='JavaScript for IE page width'}  ... didn't know if it was essential or not. 

Re: menu problems (wacked up urls)

Posted: Fri Jul 28, 2006 11:15 am
by Dr.CSS
The JS for IE page width is for strechy pages,

IE doesn't handle flexible, min/max, settings like Ff or other browsers so a JS is needed to help it, your page is a set width so no need for that.

As for the menu hmm the modules/MenuManager/CSSMenu.js is for the default menus and this one has a JS to make the second level of the menu appear horiz. under the first, not sure why it's not working, if I get time I'll check it.