Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hierarchy and mod_rewrite
#1
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?
Reply
#2
They automatically do (that is, with fancy URLs turned on).
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#3
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?
Reply
#4
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...
- 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
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.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#6
hha, i added it right after that comment. get_parent() and return_parent() were added to SVN Smile
- 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
#7
I like you guys. Smile
Reply
#8
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?
Reply
#9
^ That is correct.
Clients always want to be able to change the content of their pages, but they are unwilling to do so.

Have you ever coded in your underwear before?
Reply
#10
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.
Reply




Users browsing this thread: 3 Guest(s)