diogo Posted March 9, 2016 Share Posted March 9, 2016 Hi all! Here is a very small website that we made for this event promoted by two landscape architects. This is a one day event where private gardens in Freiburg are open to the public. There are also some planned workshops and other activities. http://freiburger-gaerten.de/ This is one of the simplest websites we did. A one pager with smooth scrolling based on anchor links. The PW part was very easy, the content of each section is in a children of home, so on the home template we simply have to iterate all the children and render them. 7 Link to comment Share on other sites More sharing options...
elabx Posted March 9, 2016 Share Posted March 9, 2016 Looks very nice! Love the drawings over the lines. That´s also my strategy to output one page sites, iterate children and just $page->render($params), what a bliss! Just a doubt, how do you handle the "/home/children" url path? I mean, even if there is now link to that actual url, is it recommended to remove it or redirect to home with a kind of auto scroll to the section? Link to comment Share on other sites More sharing options...
diogo Posted March 9, 2016 Author Share Posted March 9, 2016 Because the markup is so simple, and the sections have all the same structure, I'm actually not using the render() function, so the children template simply doesn't have a template file. But if you are using the render() there are still some possibilities: — The most immediate is to set those pages to hidden; — Another option is to check if the page is being called by the render() function, you can do this by checking for the presence of the $options array if( isset( $options ) { // spit the content } else { // redirect to home or throw a 404 } 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now