Juergen Posted March 1, 2016 Share Posted March 1, 2016 Hello @ all, I want to create a new render instance of an image field like described in this post https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/#specifying-custom-views I created the fields folder as described. Everything works fine if the render file is dirctly under the field folder, but if I want to use a custom rendering file it doesnt grab it. I have created a subfolder inside the fields folder which was named "products". In it I have a custom image file for a product image. The image field name is "singleimage" and the file inside the products folder is "singleimage.php". I have tried to render the image output in this way: echo $page->render('singleimage', '/products/singleimage'); Unfortunately it doesnt grab the file "singleimage" inside the "products" folder. It always uses the fallback. What can be the reason? Is the syntax wrong? I use the latest dev version of PW Best regards Link to comment Share on other sites More sharing options...
BitPoet Posted March 1, 2016 Share Posted March 1, 2016 Try leaving out the leading slash, i.e. echo $page->render('singleimage', 'products/singleimage'); 2 Link to comment Share on other sites More sharing options...
Juergen Posted March 1, 2016 Author Share Posted March 1, 2016 Sorry but this makes no difference Link to comment Share on other sites More sharing options...
szabesz Posted March 1, 2016 Share Posted March 1, 2016 I already started using this feature and no problem so far (without the leading slash, of course). Are you sure "singleimage.php" is in the "products" folder (without any spelling mistakes)? In your screenshot we can see a "singleimage.php" file that is NOT in the "products" folder, but we cannot see the contents of "products". 1 Link to comment Share on other sites More sharing options...
Juergen Posted March 1, 2016 Author Share Posted March 1, 2016 Hello szabesz, thanks for your reply. Yes there is a singleimage.php inside the products folder (without any writing mistakes). Thats the reason why I cannot find an explanation why it doesnt work. You write in your case it works well, so the problem is somewhere on my side. 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