GetSimple Support Forum

Full Version: Modify output of get_navigation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
To make the initial version of our one page theme function propwerly, we used a lot of jQuery and require modification of the .htacess file. http://get-simple.info/forums/showthread.php?tid=7517

I would rather build into the theme PHP files a way to make the get_navigation output #pagename instead of /pagename so I could make the theme less "hacky". There has got to be a better way.


Here is how the get_navigation is currently being used:
Code:
<?php get_navigation(get_page_slug(FALSE)); ?>


Please let me know how to do this in GetSimple, if it is even possible. Thank you!
You could use your own get_navigation function... Its your theme, you can add your own functions to it.
Or just use the menu-items filter and regex the whole thing, or dom import it.

I also see no reason for modifying the htaccess file. Why do you need to do that when you have a
indexid and a data_index filter, plus all your pages are on index so your not even using urls.
(2015-08-30, 00:41:32)frixelsolutions Wrote: [ -> ]Please let me know how to do this in GetSimple, if it is even possible. Thank you!

In my one-page theme, I used the menu_data():


PHP Code:
$menu "";

foreach (
menu_data() as $page) {
  
$menu .= "<li class='".$page['slug']."'><a href='#'>".$page['menu_text']."</a></li>";
}

echo 
$menu


Quite useful and easy.
(2015-08-30, 08:42:30)vallhund Wrote: [ -> ]
(2015-08-30, 00:41:32)frixelsolutions Wrote: [ -> ]Please let me know how to do this in GetSimple, if it is even possible. Thank you!

In my one-page theme, I used the menu_data():



PHP Code:
$menu "";

foreach (
menu_data() as $page) {
 
 $menu .= "<li class='".$page['slug']."'><a href='#'>".$page['menu_text']."</a></li>";
}

echo 
$menu


Quite useful and easy.

Thank you - that's the solution I was looking for. Will update the theme with doing this right tomorrow.