Trigger to create a link asset and nest under parent then apply new paint to child link asset


(Gavin Boyd) #1

Is this possible for a trigger using the event “Asset Created”

Trigger to create a link asset and nest the link asset under the parent asset then apply new paint to child link asset


(Bart Banda) #2

Don’t think so, as you need to create a nested content container on a SP automatically using a Trigger as well which I don’t think is possible.

What is the actual problem you are trying to solve? Maybe there are different ways in implementing a solution?


(Gavin Boyd) #3

We want to create child pages of all standard pages, which use the same content, but apply a different paint layout, and possibly also a different design.

For example:

www.example.com/courses/sociology
www.example.com/courses/sociology/amp (using amp methodology - https://www.ampproject.org)

The /amp pages would need to also have a canonical link to the parent asset.

Initial idea was to create link assets for all standard pages and nest beneath parent.


(Bart Banda) #4

Could you then instead create maybe data record assets that use a special PL (could be inherited from the SP) that then simply gets a different design and layout and references teh content from the parent standard page using %asset_parent^as_asset:asset_contents_raw% ?


(Gavin Boyd) #5

How could you go about automatically creating the data record, nesting it under the standard page? Can that be done using a trigger?


(Bart Banda) #6

Well, you don’t need to nest it, you just need to create the data record asset with the Create Asset trigger action, then it would get the same Paint Layout inherited from it’s parent Standard Page. You can then have a type format in the PL that displays different content for data records, and in that type format you could have %asset_parent^as_asset:asset_contents_raw% with some extra formatting around to make it suitable for the AMP format.