Forum

Thread tagged as: Question, Problem

Get a page attribute in a content template

Hi guys.

I have this on a page:

<?php perch_content_custom('Profile Image', array(
    'page' => '/team/*', 
    'template' => 'team_images.html'
)); ?>

Then the team_images.html template looks like this:

<perch:before>
    <ul>
</perch:before>
        <li><a href="#"><img src="<perch:content type="image" id="image" label="Profile Image" width="100" required="true" />" alt=" "></a></li>
<perch:after>
    </ul>
</perch:after>

So I can get at each item in the Profile Image region on each page, but how can I get the title and URL of the pages so I can link to them?

Russell Back

Russell Back 2 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Try:

PerchSystem::set_vars(perch_page_attributes(array(
    'skip-template' => true,
));