Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $Curso = ClassRegistry::init('Curso');
- $Curso->recursive = 3;
- $cursos = $Curso->find('all', array(
- 'conditions' => array(
- 'Curso.promocao' => 1,
- ),
- 'order' => array(
- 'Curso.id' => 'DESC',
- ),
- 'limit' => 6,
- ));
- $banner = $cursos[3]['Escola']['foto'];
- if ($banner == NULL) {
- $banner = $cursos[3]['Escola']['Localidade']['foto'];
- if ($banner == NULL) {
- $banner = $cursos[3]['Escola']['Localidade']['LocalidadePai']['foto'];
- }
- }
- echo $banner;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement