2

I want to generate the google markup,rel=alternate inks for the pages I am publishing to Content Delivery. We have used JAVA framework(not DD4T) and generating JSP at front end, I am thinking to set the hreflang value as a metadata of Publication and retrieve the same in JSP using broker query.

Could you please suggest me if it is possible to fetch the metadata of Publication using the content deliver API or I have to publish those details explicitly.

Also, do you think if it can be done in some better way?

version - SDL Tridion 2013

Thanks.

2 Answers 2

2

You can create one dynamic configuration component which will hold all static content (like yours) specific to any web publication. For this you need to create one schema maybe with all possible fields to make it more generic and reusable. Create the component as dynamic, provide all required values and publish it to broker. Write a method to query and load the configuration related information in any object maybe, to make the performance better store it in cache/session. Good thing you don't have to modify individual items which uses the same values. This could be more effective when we have more items (alt links, any other reference etc). You can check if your design needs something like this.

Else, you can opt for the option suggested by Raj which is more effective in this particular case. You can select and provide different values if needed for the pages. You may have to modify the page metadata schema (if using one) and provide values at page levels. To avoid these, you can try giving a default value in the schema field (if the value is static and same for all).

Let me know if this helps !!

1

I think you want to generate this for multilingual pages etc. You can do this at page level using page metadata. In this way you can also control which page as alternate link(s) or not. and you can fetch the metadata at page level using API and add into your page metadata easily

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.