ryan Posted February 5, 2016 Share Posted February 5, 2016 This week we have another new ProcessWire 3.x version for you that includes several updates and optimizations. We’ve also greatly expanded upon the field rendering with template files, with lots of info covered in this post. https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/ 13 Link to comment Share on other sites More sharing options...
DaveP Posted February 6, 2016 Share Posted February 6, 2016 Just read the blog post - wonderful! I have said it before and it stands repeating - one of the great things about PW (and there are many) is that updates and new features make so much sense. This field template/page template pairs is sooo powerful. Of course we could already do all this with includes and such, but one great strength of this being built in to PW is future maintainability. Someone (either someone else or me) looking at a template of mine in a couple of years would need to figure out how all these template partials are organised. Now, there's a standard way and it's documented here. 3 Link to comment Share on other sites More sharing options...
Webrocker Posted February 12, 2016 Share Posted February 12, 2016 hi, I just installed a clean 3.0.7devns with blank profile, added language support, enabled advanced mode and debug, to test and play with the fields rendering, because this will be of great use in a upcoming project… but somehow this (maybe too clean?) installation only renders the file found directly in /site/templates/fields/ my test setup: just a basic page with title field (changed the field type to: PageTitleLanguage, but changing it back to PageTitle doesn't change the behaviour). /site/templates/fields/title.php <--- prints out title in green /site/templates/fields/basic-page/title.php <--- prints out title in red the code in the title.php files is: <header> <h1 style="color: green;">(in /site/templates/fields/title.php) <?php echo $page->title; ?></h1> </header> <header> <h1 style="color: red;">(in /site/templates/fields/basic-page/title.php) <?php echo $page->title; ?></h1> </header> the code in the basic-page.php template is: <?php echo $page->render('title'); ?> in the frontend I only see the green title, from the blog post I would expect the red title to show. If I remove the title.php directly under /site/templates/fields/ the frontend rendering is unstyled. Am I missing something? cheersTom Link to comment Share on other sites More sharing options...
BitPoet Posted February 12, 2016 Share Posted February 12, 2016 Are you sure your template is basic-page (not just another template that includes it, like home)? 3 Link to comment Share on other sites More sharing options...
Webrocker Posted February 12, 2016 Share Posted February 12, 2016 ha! well spotted! of course, since I only have the blank/bare install, my only page currently is the home page. stupid me ) thx! 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