Forum

Thread tagged as: Question, Api

Easy way to get single field from a template

Hi,

I just started using Perch today and love it. Something I am currently trying to do, is get a single field from a template that has multiple fields, I have one solution but I wonder if there is an easier way rather than creating my own array. Currently I am doing it like this:

$result = perch_content_custom('Contact Details', array('skip-template'=>'true'));
print($result[0]["emailaddress"]);

Thanks!

Paul

Paul Francis

Paul Francis 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

That's how you do it, yes.

Thanks for confirming Drew :)