Quick Nav:  Online Store   |   Login | Register

Replacement rule for unqiue meta description tag

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
eoghan o'neill
<50 Posts
Posts:38


08/12/2008 9:13 AM  

I see from this thread on these forums that DavidWSnow created replacement rules (detailed in the txt file attached to one of his postings to the thread) that allowed him to create unique title and meta description tag for some pages on his DNN portal.

This got me thinking about the possibility of having a replacement rule that would set a unique meta description tag for blog entries published with the DNN blog module (in the current and next release of this module it is not possible 'out of the box' to have a unique description meta tag for each blog entry).

I came up with one method to do this - that draws somewhat on the approach DavidWSnow used - but I have not been able to come up with the Rule that would implement it. Maybe someone here with superior to my (almost non-existent) Regex skills could at least identify if this goal is feasible using Regex and – if so – maybe even suggesting the syntax of the rule.

Here is how I see it possibly working…

When publishing a blog entry the blog author has the possibility of indicating a 'blog summary'. If they do so this blog summary appears on the blog entry page within a < div> tag that has a class (="blog_entry_description").

 What I am thinking is that a search / replace could achieve this by doing the following:

  • Search for: A div tag that matches " < div class="blog_entry_description">, then parse the text content from the contents of this div tag.
  • Replace: Replace the "content" part of the meta description tag in the header with the text content found in the div whose class="blog_entry_description"

What I think will complicate this is that within the < div class="blog_entry_description"> there are other tags. There are tags generated dynamically by DNN (such as < span id="dnn_ctr443_MainView_ViewEntry_lblSummary">) or standard formatting tags (< em>, < span style="font-size: 10pt">, < font> etc). Maybe regex can easily 'ignore' such tags when parsing what is within this Div tag.

 

My questions are:

  • Is this just too complicated to do?
  • If not can any Regex expert propose some rule syntax that I could test? This would be a huge SEO benefit to those running the DNN blog module.

I hope the above information is sufficient. If more info needed let me know.

 

Thanks

 

Eoghano

DavidWSnow
<250Posts
Posts:213


08/12/2008 11:05 AM  

Using rexex rules with complex  nested html is problematic. There is no eacy way to correctly match the ending /div with the correct begininng.  In my case I am using ListX to create the page and with it I nest
a noscript then a span class="NewTitle  the title text  /end_span /end_script

PB rule replaces the title with the content of the span.

I once tried doing this with a DNN Module title and the whole world went bad due to all of the junk that DNN hides in that area.

As for the Blog - I gave up on the DNN Blog and use News Articles as a blog. Scott fixes stuff quickly and has lots of functionality.  I also use it for my Announcement module. Now I have correctly generated RSS feeds.

 

/DaveS

eoghan o'neill
<50 Posts
Posts:38


08/12/2008 4:56 PM  
Dave, Thanks for the reply. As I suspected it would be too complicated.

As for the DNN blog module, look out for the next release v3.05 (which I am dog fooding on my own site for over a month). As a member of DNN Blog Module team I can safe with confidence that it is a very big step up from previous versions. There are tons of improvements in there in terms of SEO, comment management, interfacing with the Metaweblog API, Avatars, to cite just a few. Nonetheless there is still scope for further improvement (e.g. the ability to have a unique meta description tag for a blog entry!)

Eoghano
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > Replacement rule for unqiue meta description tag



ActiveForums 3.7
Powered by: Snapsis Software