Hi it is a huge application and it should be migrated to version 2 view by view (there won't be changes in model/controller), so i think this method will be a perfect fit for what i need to do. i know cake has some similar functionaity (for example it will render default.ctp layout from cake folder if it doesn't exist in the app/ view/layouts folder) so i thought i cound bring such functionality to my app.
regards On Mar 1, 10:47 am, acl68 <[email protected]> wrote: > Why do you need this version2? > > I think it isn't possible what you ask, but if you explain a bit more > detailed, what you want to achieve, there might be another solution. > > Who should see version2 in which case? > > Anja > > Am Dienstag, 1. März 2011, um 10:01:35 schrieb K3: > > > Hi, > > > if i add another subfolder in /app/view where i want to put > > alternative view structure of the site, so for example for articles > > folder i have following structure: > > > /app/ > > /view/ > > /_version2/ > > /articles/ > > /articles/ > > > and i have 2 files > > /app/view/articles/index.ctp and /app/view/_version2/articles/ > > index.ctp > > > In general i want to render view from alternative folder if that view > > exists. something like: > > > if ("/app/view/_version2/xxxxxx/yyyyy.ctp" exists) { > > render("/app/view/_version2/xxxxxx/yyyyy.ctp"); > > } else { > > render("/app/view/xxxxxx/yyyyy.ctp"); > > } > > > is this possible? > > i wanted to add such control in beforeRender, but seems there i can't > > control which view to render, only to post variables to the view. Any > > thoughts? > > > Thanks in advance -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
