Jump to content


Robert Zelník

Member Since 27 Jul 2011
Offline Last Active Jan 08 2013 04:05 AM
-----

Posts I've Made

In Topic: A different way of using templates / delegate approach

06 August 2012 - 02:57 AM

Yes, both approaches does exactly this using PHP. My suggestion is targeted to PW core developers to rethink the "Alternate Template Filename" option to take care of both layout and view, without the need of additional PHP code in the template files.

In Topic: A different way of using templates / delegate approach

06 August 2012 - 12:48 AM

Yes, exactly. It's a similar approach done differently. I just think that it would be great if PW would allow to set both layout and view files in the template settings. Currently we can just set the layout file (in Advanced > Alternate Template Filename).

In Topic: A different way of using templates / delegate approach

05 August 2012 - 10:36 PM

Back to the Soma's template approach: I just realized that we would not need to use dirty hacks to force PW to render alternate template file, if PW would allow us to set template files for both layout and particular view.

Example:
We have a post template.
In post template we set
  • main.php for layout (default setting for the whole site) - renders the whole HTML page
  • post.php for view (default setting for this particular template - derived from the template name) - renders the content specific to the post template, nested inside the main.php layout
This approach is common in many web application frameworks.

In Topic: Is there any way to sort file/image field content?

07 June 2012 - 07:38 AM

Yes, that's it, it works well. Thanks... :)

In Topic: Could the translation files be stored in human-readable format?

01 June 2012 - 01:32 PM

Great news Ryan, thanks.