Forum

Thread tagged as: Question, Problem, Events

Best way to pass meta data from event app

Hi,

I updated to the latest event app and one thing I think that is missing is the ability to add the seo data for that event?

I looked on the docs and forum and I can't see a way to pass up a <perch:content> from the html template (in templates/events/listings) that contains a title and blurb summary to perch_layout variables (templates/layout/global/header.php) that would be included in a header?

Does anyone have a suggestion on how you could have dynamic data for each event or do I need to create a generate a static header in the containing event.php page?

Andrew Cetnarskyj

Andrew Cetnarskyj 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can add fields to the master template for an event, which is event.html.

Be sure to use <perch:events /> tags in that context.

When you add the tags they should appear on the event edit page.

Ok so I've done that already but my structure is I have on the file is:

events.php {

-- global/layout/header.php
- custom_content(calls events_detail.html that has the perch:events tag)
-- global/layout/footer.php

}

So I need to pass those event variables up from the custom content html to the global template, not sure if this is possible

Drew McLellan

Drew McLellan 2638 points
Perch Support

Just switch up the order. Do the call to get your content first, store the result in a variable and output it further down the page.