If Condition and Appending Meta Info Based on URL

Dec 30, 2011 at 1:41 PM

I had commented on the following issue:

http://dnnskinextensions.codeplex.com/workitem/14577

I am using a blog module from Ventrian. The developer uses paging for listing blog posts. However when paging is enabled, second listing page url becomes

/Blog/tabid/104/currentpage/2/Default.aspx

For other pages:

It becomes /Blog/tabid/104/currentpage/[currentpagenumber]/Default.aspx

and there is no possible configuration change for meta information for this page. So i would like to append currentpage number to title and meta desc. section so that Search Crawlers will not complain about having same meta for my listing pages.

I tried using IF condition but couldn't figure out what to use... I've read documentation :)

Coordinator
Dec 30, 2011 at 10:33 PM

Hmm, so in essence, you want to read the value from the URL and write that to the Page description?

Timo

Coordinator
Dec 30, 2011 at 11:28 PM

I think the problem is that some parts of the URL you see are not really part of the pages URL, but query string parameters, that injected into the friendly url.

I did a test and this seems to work (you do need the new beta version of the Skin object for this):

<fortyfingers:STYLEHELPER ID="STYLEHELPER5" ChangeMeta='id=MetaDescription|content=*: Page [QS:PageID]' runat="server" />

This will look for an exisitng Meta tag with id MetaDescription, and change the content attribute to:

The original Description (Represented by *) + ": Page" + the value of the PageId Query String parameter, which is  2 if your on page 2.

I set this for the articles Description in the Module: "This is my article"

The result is this description: "This is my article: Page 2" in the meta tag (if on page 2)

I used News Articles main module, should work the same for News Articles Latest

New 02.03.00 Beta version of skin object here: http://stylehelper.codeplex.com/releases/view/79650

I tested this on DNN 5.6.3

HTH Timo


Jun 17, 2013 at 8:25 AM
Sorry, Timo I couldn't reply to this but now I'm going to test it. Thanks for your efforts.
Coordinator
Jun 18, 2013 at 7:31 AM
OK, np