Forum

Thread tagged as: Question, Addons, Api

Access Perch Template Var inside App

Hello,

I'm trying to create a Shortcode App that will display a button

But the button needs different actions depending on a Page Attribute

On page templates I use

$enquiry_form_embed = perch_page_attribute('enquiry_form_embed', array(
            'template' => 'body_attributes.html'
        ),true);

And works perfect

But how do i access the same data in an APP

Thanks

Anthony Elleray

Anthony Elleray 2 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You don't have any access to the page when parsing a shortcode. The parsing doesn't happen in the context of a page.