Thanks for getting back to me.  I think i'm going to try the layouts
for now and see where i go.

Cheers


On Mar 18, 12:39 am, brian <bally.z...@gmail.com> wrote:
> If you set a var in the controller you'd still need to test in the
> view whether or not to include the element, so it wouldn't be much
> different than checking the User.id from session.
>
> I suppose you could also create 2 views and call render() on the
> appropriate one from the controller. Not very DRY, though. Unless both
> views just included elements--one with, and one without the comments
> stuff and both including a Post display element.
>
> On Tue, Mar 17, 2009 at 1:01 PM, ross.hagg...@googlemail.com
>
> <ross.hagg...@googlemail.com> wrote:
>
> > Hi
>
> > Just thinking how i can organise my layouts and elements.  If i have
> > some specific functions e.g. a comments form which can only be
> > completed by the post owner, how should i place this in the post
> > view?  Should i create a separate layout or create an element and have
> > a conditional statement.  I shouldn't add conditional statements to
> > the view right?  So the only thing i can think of is creating a
> > variable using set in the controller function and adding the relevant
> > element name which i'm sure is the wrong way to go.  Any help would be
> > appreciated.
>
> > R
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to