Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Google news technical requirements View modes: 
User avatar
Member
Member
ara.mailbox-gmail - 7/3/2011 7:18:41 PM
   
Google news technical requirements
Hi

There is some technical requirements to make google news crawler index your news in google news. you can find the requirements here.

basically news URL should include a sequence of numbers (at least 3 digit). a good candidate for this number is news article id.

the question is how we can include news article is is in URL like following map

news/{newsarticleid}/{news title}

I would appreciate any suggestion.

Thanks
Ahmad

User avatar
Kentico Support
Kentico Support
kentico_radekm - 7/3/2011 7:46:37 PM
   
RE:Google news technical requirements
Hello.

I would recommend you to add a query parameter into your URL, and get current document ID e.g. from CMSContext class (generally via context macro). For example CMS.CMSHelper.CMSContext.CurrentDocument.DocumentID (API), or {%cmscontext.currentdocument.documentid%} (context macro). You can add parameter in several ways. Via CMS.GlobalHelper.UrlHelper.AddParameterToUrl() method (see API reference file for more details), or manually e.g. in transformation.

Then, you can get and evaluate this query parameter and its value via query macro, according to following article: [url=http://devnet.kentico.com/docs/devguide/appendix_a___macro_expressions.htm ]http://devnet.kentico.com/docs/devguide/appendix_a___macro_expressions.htm [/url]

Best Regards,
Radek Macalik