Forum

Thread tagged as: Question, Api, Add-on-development

Perch API - Questions re '->set' method

Hi guys,

I've been working on an app for a while now, and I'm just looking for a little advice on the below code (Perch standard code):

$Template   = $API->get('Template');
$Template->set('members/member.html', 'members', $Members->default_fields);

How does this work? What are the parameters in the ->set() function achieving?

Thanks Harry

Harry Ray

Harry Ray 0 points

  • 4 years ago

Hi Harry,

  1. Path to the template,
  2. Template name space e.g. <perch:members />
  3. Default fields required by your app, you can skip if there is none.