GetSimple Support Forum

Full Version: Hierarchy and mod_rewrite
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm in the process of figuring out whether or not GS is right for my project and one thing that I can't figure out is if it's possible to make page slugs appear in hierarchy, i.e.:

http://example.com/aboutus
http://example.com/aboutus/history

(a "history" page is under the parent page "about us")

Is there a way to do this?
They automatically do (that is, with fancy URLs turned on).
Ah, very nice!

This is a less pressing issue, but... Is there a way to keep the selected <li> in the nav displaying in the "selected" CSS class when viewing a lower-level page?
StateStreet Wrote:Is there a way to keep the selected <li> in the nav displaying in the "selected" CSS class when viewing a lower-level page?

That would be nice. I've always wanted to like that. I think you could do it with some CSS and adding to the <body> classes. Do we have a get_parent() theme function? we should...
ccagle8 Wrote:Do we have a get_parent() theme function?
When the developers no longer know what functions are there …

I don’t believe we have, but there is a global variable that contains the parent as it is read at the same time as the other page data. So you’ll be able to do it, either with a new function or just by calling the variable.
hha, i added it right after that comment. get_parent() and return_parent() were added to SVN Smile
I like you guys. Smile
StateStreet Wrote:... one thing that I can't figure out is if it's possible to make page slugs appear in hierarchy, i.e.:

http://example.com/aboutus
http://example.com/aboutus/history

My problem is that I can't even seem to create a sub-page! I have seen in the Create New Page > Page Options > Parent Page setting, but the only option I am ever given is "index".

So ... how DO you created a sub-page?? What am I missing? It must be simple! :/

Edit: I think I answered my own question: you can't add a sub-page to a sub-page ... would that be correct?
^ That is correct.
DjR Wrote:
StateStreet Wrote:... one thing that I can't figure out is if it's possible to make page slugs appear in hierarchy, i.e.:

http://example.com/aboutus
http://example.com/aboutus/history

My problem is that I can't even seem to create a sub-page! I have seen in the Create New Page > Page Options > Parent Page setting, but the only option I am ever given is "index".

So ... how DO you created a sub-page?? What am I missing? It must be simple! :/

Edit: I think I answered my own question: you can't add a sub-page to a sub-page ... would that be correct?

While you can only have two levels in GS, your home page can (and should) sit at the same top level as your other main pages, which then leaves the second level for pages in each of those sections. Your home page is still "/" while your other pages are accessed at their respective slug URIs, even though they both have no parent page.