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 |