Grafikart/CakePHP-Media — pull request #32 by clemaurny (2013-10-13 23:08:06+00:00)
Title: Medias rendered in home.ctp

If you want to have some Medias just in home of your project,
just set to home when ordering a media. Then in the PagesController, load the model Media with only home images and loop images in the view with (for carousel exemple) :

Media->image($media['Media']['icon'], 700,320); ?>

prev
next

in the Controller, for pages add this :
public function display() {
$medias = $this->loadModel('Media.Media');
$allmedias['medias']=$this->Media->findAllByIsHome(1);
$d["medias"] = $allmedias;
$this->set(compact('medias'));
$this->set($d); ... }