Getting a metadata value to display on a page


(Webmaster) #1

Hi,


I've set up a metadata schema with the intention of using it to display a customisable date (ie. not a keyword) on whatever page it's applied to. This part's all good but how can I get this to display on the asset? I've defined the date and applied to schema to the page so in the <head> it shows:

<meta content="13/Dec/2006" name="CORRECTIONS.CustomDate"/>

…but don't know how to make it display on the content div of the page. I'm sure it's something simple but I'm stuck!



Thanks


(Avi Miller) #2

Does %globals_asset_metdata_<field_name>% work? In your example, they keyword would be %globals_asset_metadata_CORRECTIONS.CustomDate%.

(Webmaster) #3

Thanks Avi you da man, that keyword did the trick in the main body copy of the pages we need it for (Point ‘A’ in the image eg.1).


However…I’ve also nested an asset listing page in the ‘Recent Press Releases’ column on the right (point B ). I’ve inserted %globals_asset_metadata_CORRECTIONS.CustomDate% in the type formats for the asset listing but it’s not displaying each pages metadata value here, it’s displaying what is on the page it’s been nested in. Just trying to think of another way to structure this…perhaps nesting the keyword in asset listings type formats. or maybe there is another keyword I could use here?



eg1

[attachment=277:mediarel…metadate.jpg]



eg2

[attachment=278:mediarel…etadate2.jpg]
mediareleasemetadate.jpg (58.1 KB)
mediareleasemetadate2.jpg (65.1 KB)


(Avi Miller) #4

The %globals_*% keywords always refer to the painting asset, so when used inside an asset listing, it'll keep printing the same thing (because it's referring to the asset listing or page being printed, not each asset). Inside a Type Formats bodycopy, you just use %asset_metadata_FieldName%, which would be %asset_metadata_CORRECTIONS.CustomDate%. This is then replaced for each asset that is listed.

(Webmaster) #5

Thanks Avi, that makes perfect sense and worked like you said.
Cheers

Matt