Closed geibi closed 8 years ago
@geibi I believe that's what is in there now, check out:
https://github.com/Upstatement/timber-starter-theme/blob/master/page.php#L27
... are you sure you're looking at master
?
ouuuuhhhhhhh! sorry jarednova. i think something went wrong on my side, because it was like i posted above. brillant, that's how it should be :)
Wouldn't it be better to replace line 27 in page.php
Timber::render( array('page.twig' ), $context );
with
Timber::render( array( 'page-'.$post->slug.'.twig', 'page.twig' ), $context );
So you got only one page.php but multiple page-home.twig page-contact.twig aso would be possible? Additionally you are also free to duplicate page.php to e.g. page-about.php if you need to modify some other processing.
Or is there any downside?