trying to make a menu

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
BoYgAB90

trying to make a menu

Post by BoYgAB90 »

im trying to make a menu that when you click on it it updates one section of the page and the rest is the same
i dont know how to do this with menu manger so i got this php code but the problem is when i click on a link it just goes back to the homepage of the site
or if i can do the same thing using menu manager it would be better

Code: Select all

   // Define our array of allowed $_GET values

        $pass = array('category1','category2','category3','default');


    // If the page is allowed, include it:

        if (in_array($_GET['cat'], $pass)) {
include('uploads/videos/' . $_GET['cat'] . 'php');
        } 

    // This will load the default page:
        elseif (!isset($_GET['cat'])) {
            include ('uploads/videos/default.php'); 
        }

    // If the page is not allowed, send them to an error page:
        else {
                // This send the 404 header
                    header("HTTP/1.0 404 Not Found");
                // This includes the error page
                    include ('error.php');
        }

Code: Select all

<a href="index.php?cat=category1">category1</a>
the default pages works but not the links, just goes to home page with url .../index.php?cat=category1
but it works on my computer which is not using cmsms
Vin

Re: trying to make a menu

Post by Vin »

I'm not sure what exactly you want to achieve - do you want to have a menu, which - when a link is activated - expands the active parent section link and shows its child links? Then try playing with the attribute collapse. Have you looked in the documentation - http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Layout/Menu_Manager#Generic_sub-menu?
BoYgAB90

Re: trying to make a menu

Post by BoYgAB90 »

no an example is http://www.igzones.com&nbsp; and click on the menu and pick a page other than forum, my script does the same thing they do but it isnt working right with cmsms but it is without cmsms
Vin

Re: trying to make a menu

Post by Vin »

Just a simple navigation without ANY hierarchy? Then it's actually very easy ;D
I think there is a file template called minimal_template.tpl or-something-like-that in the default install in the menu manager, which would suit this case of minimal navigation.
However, if I get it, you're asking whether it's possible to update just a part of the page. Yes, of course, it's even intended. That's what the templates are for - to define a common HTML code for all/a group of pages, and then to place Smarty placeholders where you want to place the {content} of the current page, the {menu}, possibly with some optional parametres (see help). But you can leave there other stuff such as {news} etc. Many of the modules have the tag output for the template. And to have a better structured template, you can use GCB (Global Content Block), which is a wrapper for a content you want to have in the template, but  to be able to modify it somewhere else in order to have well-arranged template.

Hope that helps.
Locked

Return to “CMSMS Core”