Actually I tried to implement Google Markup on our pages, so that our usercontrol will render below type of HTML on the page header section
<link rel="alternate" hreflang="en-GB" href="http://www.mysite.com/english/index.aspx" />
<link rel="alternate" hreflang="de-DE" href="http://www.mysite.com/de/german/index.aspx" />
<link rel="alternate" hreflang="en-DE" href="http://www.mysite.com/de/english/index.aspx" />
<link rel="alternate" hreflang="ru-RU" href="http://www.mysite.com/ru/russian/index.aspx" />
<link rel="alternate" hreflang="en-RU" href="http://www.mysite.com/ru/english/index.aspx" />
<link rel="alternate" hreflang="fr-FR" href="http://www.mysite.com/fr/french/index.aspx" />
<link rel="alternate" hreflang="it-IT" href="http://www.mysite.com/it/italian/index.aspx" />
<link rel="alternate" hreflang="ja-JP" href="http://www.mysite.com/jp/japanese/index.aspx" />
<link rel="alternate" hreflang="ko-KR" href="http://www.mysite.com/kr/korean/index.aspx" />
<link rel="alternate" hreflang="pt-BR" href="http://www.mysite.com/br/portuguese/index.aspx" />
<link rel="alternate" hreflang="zh-Hans-CN" href="http://www.mysite.com/cn/chinese/index.aspx" />
<link rel="alternate" hreflang="en-US" href="http://www.mysite.com/us/english/index.aspx" />
<link rel="alternate" hreflang="en-GB" href="http://www.mysite.com/uk/english/index.aspx" />
<link rel="alternate" hreflang="en-AU" href="http://www.mysite.com/au/english/index.aspx" />
<link rel="alternate" hreflang="en-AE" href="http://www.mysite.com/ae/english/index.aspx" />
In above html you can find this part of HTML "/ae/english/index.aspx, /au/english/index.aspx etc" from Broker LINK_INFO table, this implementation worked fine till we went LIVE website with LIVE broker database, and when we enable this functionality on LIVE our server performance got killed due to the hits on broker database and it seems locking of LINK_INFO table as our website has got 1.5 million per day hits, above functionality works like as below:
- Whenever any website page is loaded it calls our proxy and proxy calls our webservice and webservice calls our SQL Procedure which goes to LINK_INFO table and takes out a list of result on the basis of PageID passed to SQL Procedure.
- The SQL Procedure returned xml result is then passed to my control where my XSLT uses it and rendered out above full HTML.
It seems something is getting wrong, please suggest is there can be other way around to achieve this above functionality without touching broker database. Writing Page EVENT or Customizing Deployer would help?
Please suggest!!
Note: We are using Tridion 2009
EDIT: Broker SQL Procedure is as below:
ALTER PROCEDURE [dbo].[GETDataFromLinkInfo]
-- Add the parameters for the stored procedure here
(@PageID INT)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT DISTINCT [PUBLICATION_ID] AS n,
[URL] AS u
FROM [LINK_INFO] WITH(NOLOCK)
WHERE Page_ID = @PageID
AND Component_Template_Priority > 0
AND PUBLICATION_ID NOT IN( 232, 481 )
ORDER BY URL
FOR XML RAW ('p'), ROOT ('ps');
RETURN
END
I hope you have some standard code in your implementation, which you might be able to search in for some proper Tridion API linking. Obviously, as has been stated already before, querying the Tridion Broker directly is not supported, but it also makes no sense for this Tridon Core Linking feature.
Anyway, look for code that looks like this:
Get your hand on some Tridon documentation ASAP. That is a must when working with Tridion!
Good luck!
EDIT: An untested code sample which should be able to write out your Google Markup MultiLingual link in the head when the method id called with the pageID (without TCM):
This would require you to store the publications and the culture string that belongs with each publication in the web.config. Of course, you can store this somewhere else as well, but this would seem to be the quickest and least stressful for the webservers. Of course proper caching needs to be in place.
This would avoid you having to write custom deploy scripts or other complicated non-standard Tridion methods.