PageList custom template echo Area

Permalink
Hi,
I'm trying to echo a custom Area defined in a Page Type template in a Page List but I don't know how to do it. My searches led me to getArea but I don't know if that's what should be used because I couldn't make it work. And I didn't find much on this subject..

Can anyone help?

Cheers

ESKEMA
 
glockops replied on at Permalink Best Answer Reply
glockops
Not saying you should do it, but here's a way of getting an area in a page list.

In your page list's for loop add the following:
<?php
   $area = Area::get($cobj,'Main');
   $area->display($cobj);
?>

Where 'Main' is the handle of the area you want to display. And $cobj is the collection object in the current loop.
ESKEMA replied on at Permalink Reply
ESKEMA
Thank you. Perfect!

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.