PeterDK Posted January 31, 2014 Share Posted January 31, 2014 Right now I have a page holding 'data' (rental prices) I keep it separate because i want to edit this in one place and use it 8 times (4 languages, 2 presentation (list, selectable)) Right now I'm using Hanna code to create a 'template' for this code (see github). I don't feel right about this solution. Can I use this one page with multiple templates? And in the page that I use instead of calling [[Hanna code]] use $pages->get('data')->render(with template nr 8)? Link to comment Share on other sites More sharing options...
adrian Posted January 31, 2014 Share Posted January 31, 2014 A couple of relevant posts: http://processwire.com/talk/topic/4367-using-page-renderoptions-and-template-cache/ http://processwire.com/talk/topic/5394-page-renderfilename-confusion/ 1 Link to comment Share on other sites More sharing options...
ryan Posted February 7, 2014 Share Posted February 7, 2014 Right now I have a page holding 'data' (rental prices) I keep it separate because i want to edit this in one place and use it 8 times (4 languages, 2 presentation (list, selectable)) I'm unclear about why you are using Hanna code for this. I might not be understanding the question, but it sounds like something that maybe you should just be using pages for. For instance, you could have a page called /tools/rental-prices/, and output that: echo $pages->get('/tools/rental-prices/')->body; If you had various different options for rental prices, then you could create a 'page reference' field called rental_prices, and make it select from one of the many pages living under /tools/rental-prices/, like /tools/rental-prices/summer/ and what not. Then you'd output it like this: echo $page->rental_prices->body; 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