RE: Sub templating

2009-06-10 Thread Steven Wright
Thanks man, thats the trick.

  _  

From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
Of Sam Sherlock
Sent: Tuesday, June 09, 2009 3:34 PM
To: cake-php@googlegroups.com
Subject: Re: Sub templating


in views/subscribers/view.ctp
$this->element('../subscribers/subview1'); 
$this->element('../subscribers/subview2');
- S



2009/6/9 RhythmicDevil 



Hello,
I have a view.ctp for a Subscriber. I want to break up the view into
several smaller templates as there are tabs and all sort of stuff on
the view. However logically the small pieces dont belong in elements
as they are not used anywhere else. I want to put them in views/
subscribers and just include them into the view.ctp template.


app/
   views/
   subscribers/
   view.ctp
   subview1.ctp
   subview2.ctp


1) Is that possible?
2) Is that correct within Cake's framework?

Thanks
Steve









--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Sub templating

2009-06-10 Thread Steven Wright
Yep, thats what I ended up doing. Thanks for the help.




On Wed, Jun 10, 2009 at 11:46 AM, rich...@home wrote:

>
> or alternatively (not tested, may not work), create a subscribers
> folder in elements:
>
> app/
>views/
>elements/
>subscribers/
>subview1.ctp
>subview2.ctp
>
> and in your view:
>
> element("subscribers/subview1); ?>
>
> That way you'll keep your subviews which *are* elements out of the
> views folder
>
> On Jun 9, 8:33 pm, Sam Sherlock  wrote:
> > in views/subscribers/view.ctp
> > $this->element('../subscribers/subview1');
> > $this->element('../subscribers/subview2');
> > - S
> >
> > 2009/6/9 RhythmicDevil 
> >
> >
> >
> >
> >
> > > Hello,
> > > I have a view.ctp for a Subscriber. I want to break up the view into
> > > several smaller templates as there are tabs and all sort of stuff on
> > > the view. However logically the small pieces dont belong in elements
> > > as they are not used anywhere else. I want to put them in views/
> > > subscribers and just include them into the view.ctp template.
> >
> > > app/
> > >views/
> > >subscribers/
> > >view.ctp
> > >subview1.ctp
> > >subview2.ctp
> >
> > > 1) Is that possible?
> > > 2) Is that correct within Cake's framework?
> >
> > > Thanks
> > > Steve
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Sub templating

2009-06-10 Thread rich...@home

or alternatively (not tested, may not work), create a subscribers
folder in elements:

app/
views/
elements/
subscribers/
subview1.ctp
subview2.ctp

and in your view:

element("subscribers/subview1); ?>

That way you'll keep your subviews which *are* elements out of the
views folder

On Jun 9, 8:33 pm, Sam Sherlock  wrote:
> in views/subscribers/view.ctp
> $this->element('../subscribers/subview1');
> $this->element('../subscribers/subview2');
> - S
>
> 2009/6/9 RhythmicDevil 
>
>
>
>
>
> > Hello,
> > I have a view.ctp for a Subscriber. I want to break up the view into
> > several smaller templates as there are tabs and all sort of stuff on
> > the view. However logically the small pieces dont belong in elements
> > as they are not used anywhere else. I want to put them in views/
> > subscribers and just include them into the view.ctp template.
>
> > app/
> >    views/
> >        subscribers/
> >            view.ctp
> >            subview1.ctp
> >            subview2.ctp
>
> > 1) Is that possible?
> > 2) Is that correct within Cake's framework?
>
> > Thanks
> > Steve
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Sub templating

2009-06-09 Thread Sam Sherlock
in views/subscribers/view.ctp
$this->element('../subscribers/subview1');
$this->element('../subscribers/subview2');
- S


2009/6/9 RhythmicDevil 

>
> Hello,
> I have a view.ctp for a Subscriber. I want to break up the view into
> several smaller templates as there are tabs and all sort of stuff on
> the view. However logically the small pieces dont belong in elements
> as they are not used anywhere else. I want to put them in views/
> subscribers and just include them into the view.ctp template.
>
>
> app/
>views/
>subscribers/
>view.ctp
>subview1.ctp
>subview2.ctp
>
>
> 1) Is that possible?
> 2) Is that correct within Cake's framework?
>
> Thanks
> Steve
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Sub templating

2009-06-09 Thread RhythmicDevil

Hello,
I have a view.ctp for a Subscriber. I want to break up the view into
several smaller templates as there are tabs and all sort of stuff on
the view. However logically the small pieces dont belong in elements
as they are not used anywhere else. I want to put them in views/
subscribers and just include them into the view.ctp template.


app/
views/
subscribers/
view.ctp
subview1.ctp
subview2.ctp


1) Is that possible?
2) Is that correct within Cake's framework?

Thanks
Steve

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---