I am trying to allow a widget to define a canonical link(tag) in the metadata of a blog post. Is it possible to set the link and then later retrieve it?
Clarifying this is for a blog post
[edited by: Beck at 7:19 PM (GMT 0) on Mon, Mar 21 2022]
I am trying to allow a widget to define a canonical link(tag) in the metadata of a blog post. Is it possible to set the link and then later retrieve it?
If you are saving this data for a blog post, you could save it within the ExtendedAttributes of the blog post (and later read it from the same location).
The canonical link can be set from a widget using the $core_v2_page.SetCanonicalUrl() method ( https://community.telligent.com/community/11/w/api-documentation/65827/core_5f00_v2_5f00_page-script-api#SetCanonicalLink )
Okay, thanks for the quick reply. Also how do I properly set an ExtendedAttribute? I was trying earlier but when I tried to retrieve the ExtendedAttributes array it said Count: 0.
Okay, thanks for the quick reply. Also how do I properly set an ExtendedAttribute? I was trying earlier but when I tried to retrieve the ExtendedAttributes array it said Count: 0.
API entities that expose extended attributes work similarly. Here's an example from another thread that dealt with groups:
set Extended Attributes while creating a Group
Note that you must pass the extended attributes in the options collection on a Create/Update call.