Why won't page properties macro data, from within a live-template, populate a page properties report macro?

  • 6
  • Question
  • Updated 1 year ago
I have a live-template that contains a page properties macro. Within the page properties macro I have a two column table with keys for Page Status, Created By, Published Date. I then use the Get-Metadata macro from Comala Workflows to populate the values for each of these keys. 

When I create a new page using this live-template, the page accurately displays the metadata. (directly on the page in a two column table)

The issue is when I add a Page Properties Report macro to another page to create a report on all pages that use this live-template, the Page Properties Report macro table is empty. Only when I use these reporting macros outside of the live-template will they function correctly and display the desired result.

Any idea why the page properties and page properties report macros won't work when used in a live template?

Thanks,
Dan
Photo of Dan

Dan

  • 9 Posts
  • 0 Reply Likes

Posted 1 year ago

  • 6
Photo of TheYves

TheYves

  • 3 Posts
  • 1 Reply Like
I just ran into the same issue. :-(
Photo of Klemens Schwarz

Klemens Schwarz

  • 4 Posts
  • 1 Reply Like
Me too. I had been in contact with the ServiceRocket team and that was their current answer: 

I’ve managed to replicate this issue, and discussed it with the project team. From their point of view, they’ve indicated that this issue is due to the limitation of Page Properties Report macro, as because Page Properties Report macro’s query is based on page with Page Properties macro’s name. If Live Template macro is being used, Page Properties Report macro will directly query the immediate macro that’s available, and assume there is no Page Properties on the page.
Best regards,
Klemens
Photo of TheYves

TheYves

  • 3 Posts
  • 1 Reply Like
I've found a workaround for this issue which works for me.

In the template which contains the live template, I added a page properties macro with all page properties I would possibly ever need. To receive the actual values from the live template I used the get-data macro.

Whenever I need to add a new page property, I have to update all pages. That's not nearly perfect but I hope this won't ever happen.

Maybe there's way for ServiceRocket to make a new macro besides the live template which generates those page properties automatically? 
Photo of Klemens Schwarz

Klemens Schwarz

  • 4 Posts
  • 1 Reply Like
Hi there! Can you explain your approach a bit more detailled? Where do you use the the get-data macro? Which pages do you have to update? 
Photo of TheYves

TheYves

  • 3 Posts
  • 1 Reply Like
Let's say you have a template with a text-data macro with the field name "firstname". Now you create a second template, which uses the live-template macro with the template you've created before. You also have to add the page properties macro and a table with two columns and (in this example) one row. In the first column you type "Firstname" and in the second column you can use the get-data macro with the field name "firstname" to get the actual value.

So you have:
- a first template with all you data fields and whatever you need for your pages
- a second template which only contains the page properties and live-template macros

When you create a new page, you always have to use the second template. 

I hope this explanation made it a bit clearer. :)
(Edited)
Photo of Klemens Schwarz

Klemens Schwarz

  • 4 Posts
  • 1 Reply Like
Unbelievable, that works! Great, thank you, I'll go with that solution for now. 
Although, ServiceRocket, we might go further with the Page Properties Report so that it does that without another page template needed.