Forum for discussing general topics related to Couch.
6 posts Page 1 of 1
Hi

I am trying to work out the menu and how to display the new pages created from the admin side

In the admin side, have got the menu etc showing in the advanced dropdown menu when on the edit page

I have made it show in menu and filled the menu text in

The parent page is none as will be the main menu but when I refresh the main site, it is not showing

I looked it up and said to do the following

download superfish and put in the root which I have and then create menu.html and put the following coding in

Code: Select all
<cms:set path_to_superfish="<cms:show k_site_link />/superfish/" />
<link rel="stylesheet" media="screen" href="<cms:show path_to_superfish />css/superfish.css" />

<script src="<cms:show path_to_superfish />js/jquery-1.2.6.min.js"></script>
<script src="<cms:show path_to_superfish />js/superfish.js"></script>

<script>

    $(document).ready(function(){
        $("ul.sf-menu").superfish();
    });

</script>

<div id="navwrap">
   <cms:menu masterpage='index.php' menu_class='sf-menu' />
</div>


and then put
Code: Select all
<cms:embed 'menu.html' />
in each of the templates so I put it in new_page_list.html file

Is all the above correct as is not showing on the front end, please help just can't work it out, sorry

Thank you in advance

Kind regards

Ian
Hi Ian,

To troubleshoot, let us strip the menu to bare basics (i.e. no JS, no CSS).
Place the following in your template at the place where you want the menu to appear -
Code: Select all
<h3>My Menu</h3>
<cms:menu masterpage='index.php' menu_class='sf-menu' />

Do you see 'My Menu'? If not first troubleshoot why is that.
Does the menu markup appear? If not, check the 'masterpage' attribute of cms:menu.

Let us know how it goes.
Thanks.
Hi

So is the template the new_page_list.html or new_page.php, sorry?
The template is the one with .php extension (the one in which you've added the <?php require_once( 'couch/cms.php' ); ?> .. <?php COUCH::invoke(); ?> statements).

However, when you put a <cms:embed 'some_snippet.html' /> somewhere in the template (or even in any embedded snippet), that snippet also becomes a part of the template. That is to say, when the final HTML gets outputted, the contents of the template proper and all snippets embedded in it are clubbed together to form the final output.

So you should place the menu somewhere where it gets outputted.
Ah sorry I was on index.php, I went on the new_page.php from the admin side and now see the menu that says My Menu and drops down on hover with the new pages that I created

So now is working, how do I get the other pages displayed such as the Home, About us etc as well as the new pages created from the admin side?
Hi

Sorry to be a pain

I can't work out the following

now it is working when I access the new_page.php?p=26 page, how do I get the other pages displayed such as the Home, About us etc as well as the new pages created from the admin side?

Kind regards

Ian
6 posts Page 1 of 1
cron