Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
tsdwc.org
#1
I think GetSimple was absolutely perfect for this client. I am responsible for the coding and CMS-implementing on this site, someone else did the design. They really didn't need a lot of features for the site, and I was able to customize a theme and implement it within a couple of hours. (The site is still in development.)

http://www.tsdwc.org
Reply
#2
I like what you've done so far!
------
I can't design for shit but I can code the shit out of your design
Reply
#3
Thanks.

I'm new to PHP — just started learning a couple of months ago. I am also playing around with customizing the CMS on another site, and the code calls for alternating "even"/"odd" classes on the li's. I thought the best way to go about this would be to pull the menu order down and compare it to an array of odd numbers, and have an if {} statement that would make $class ="odd" if it matched the odd numbers and "even" if it matched the even numbers. However, I'm having trouble pulling it off...

This may be a dumb question, but how would I call down the menu order number for use in such a function?
Reply
#4
OldChap - I don't think I ever made a template function to pull menu data (and maybe even a few other things). I will get on that tonight, and make sure it is int he next release. Great idea!
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#5
OldChap, - For now, I was able to create a funtion that took a page's slug for an option, or if you left it blank, it would return an array of all pages that have the menu enabled. I am not sure how useful this would be to you, but it would give you any piece of data you might possibly need to re-recreate the menu yourself (if you don't want to use the default output of the get_navigation() template tag)


This is what the <?php menu_data(); ?> returned for the get-simple.info site:

Code:
Array
(
    [0] => Array
        (
            [slug] => contact
            [url] => http://get-simple.info/contact
            [parent_slug] =>
            [title] => Contact Us
            [menu_priority] => 0
            [menu_text] => Contact
        )

    [1] => Array
        (
            [slug] => index
            [url] => http://get-simple.info/index
            [parent_slug] =>
            [title] => GetSimple CMS
            [menu_priority] => 1
            [menu_text] => Home
        )

    [2] => Array
        (
            [slug] => start
            [url] => http://get-simple.info/start
            [parent_slug] =>
            [title] => About GetSimple
            [menu_priority] => 3
            [menu_text] => About GetSimple CMS
        )

    [3] => Array
        (
            [slug] => download
            [url] => http://get-simple.info/download
            [parent_slug] =>
            [title] => Download GetSimple CMS
            [menu_priority] => 6
            [menu_text] => Download
        )

    [4] => Array
        (
            [slug] => docs
            [url] => http://get-simple.info/docs
            [parent_slug] =>
            [title] => GetSimple Documentation
            [menu_priority] => 12
            [menu_text] => Documentation
        )

)

and this is what his is what the <?php menu_data('download'); ?> returned for the get-simple.info site:

Code:
Array
(
    [slug] => download
    [url] => http://get-simple.info/download
    [parent_slug] =>
    [title] => Download GetSimple CMS
    [menu_priority] => 6
    [menu_text] => Download
)


If this sounds useful to anyone, let me know... i think I might include it in th next release if others could use it.
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#6
That does sound useful.

What I've been doing is going in the get_navigation() function and substituting my own attempts at determining even/odd classes as a $class variable instead of the default $classes for determining what class to echo.

I haven't been able to figure out how to get the menu order number, and your function looks like it gets what I need. What is the code for the function?
Reply
#7
this is exactly what is great. it would be nice if you could get it into the stage of smarty's tpldump where you get a tree of links (currently this has to be done by developer) but it sure is a great step forward to making a menus.
Reply
#8
I figured it out!

Within the existing function, after line 221 on theme_functions.php, I simply added:

$menu_order =$page['menuOrder'];
if($menu_order % 2) {
$class = "odd";
} else {
$class ="even";
}
Reply
#9
This is the dummy site I was working on and needed the alternating even/odd classes for:

http://pdglaunch3.info/warlick/
Reply
#10
Oops, I have the "even" and "odd" in the wrong order /Smile
Reply




Users browsing this thread: 1 Guest(s)