Jump to content

freetobekids-drc.org


Marty Walker
 Share

Recommended Posts

Hi Marc,

Thanks. Yes it was. I just took a split tree approach.

Image%202012.06.12%204:14:26%20PM.png

This thread helped: http://processwire.c..._yaml#entry6537

...as did this post by Alistair Monk: http://codeordie.pos...processwire-cms

For the navigation it gets gnerated depending on what tree I'm in:

<?php
$homepage = $pages->get("/$lang/");
$children = $homepage->children;
$children->prepend($homepage);
echo "<ul class='nav'>";
foreach($children as $child) {
$class = $page === $child ? " class='current'" : '';
echo "<li$class><a href='{$child->url}'>{$child->title}</a></li>";
}
echo "</ul>";

But because the French navigation is longer than the English version I need to style it differently by using:

<body id='<?=$lang;?>'>

... then

#fr ul.nav {
...
}

Regards

Marty

Link to comment
Share on other sites

Marty, great work as always.

I noticed that the french pages use english titles in the url. Not sure if it's intended or not, but would be easy and make sense to have speaking urls.

Link to comment
Share on other sites

Nice site. Maybe you could store the visitors language preference in a cookie? Upon revisiting the site it still gives the choice a language page. Maybe a default lang and if and when a visitor choices otherwise store it for next visits.

Link to comment
Share on other sites

Nice! I also like it.

Maybe you could store the visitors language preference in a cookie?

This is one case where I think it makes sense the way it is now. With this theme, visitors shouldn't be in a hurry, there's no harm in making them click one more time, and have less automation. Also, it's one more opportunity for them to see one of the random images

This site illustrates well what I meant here http://processwire.c...__40#entry12539 (Marty, sorry for this deviation)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...