Sunday, January 4, 2009

Re: getting content from another content type into a "static" page

Elements sound like the right thing, but you can always use a model
anywhere you like, and Cake does some really nice magic for you in
most cases where you'd want to do this.

Sounds like you are wanting to get some specific data displayed on
your home page, which would involve adding the models to your app
controller (haven't ever tried this myself, outside of Auth data).

Chris Hartjes has a nice article on his blog where he debunks Cake
myths, and shows you how to use multiple models in a controller (see
http://www.littlehart.net/atthekeyboard/).

On Jan 4, 8:16 am, "Rick Hurst" <rick.hu...@gmail.com> wrote:
> On Sun, Jan 4, 2009 at 3:57 PM, Smelly_Eddie <OlliT...@gmail.com> wrote:
>
> > Rick:
>
> > I think you want to look into elements.
>
> > You can create an action in your articles  controller like
> > "loadArticleSnippet($id)"
>
> > You can then call that action from an element that is coded into your
> > homepage.
>
> >http://book.cakephp.org/view/97/Elements
>
> cheers for that, i'll look into Elements. it would useful to know how
> to use other models in my pages though..
>
> --
> Rick Hurst, Web developer, Bristol, Englandhttp://www.rickhurst.co.uk
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: