When pages are connected to multiple links allover the project – for example by using keywords – you will end up with one page published multiple times in several folder. This leads to duplicate content and search engines like Google, Yahoo, Bing, … basically any engine crawling your page will assume that you are trying to get a higher ranking by duplicating your content and keyword density. This can unfortunately lead to a full exclusion from Google’s search index and none of your pages within your domain would be found. Disturbing, isn’t it?
So why does the publishing of multiple pages happen?
Let’s have a look at the architecture of link elements within the Web Solutions Management Server RedDot CMS:
The PageBuilder is the core piece which follows the link structure of your Content Management Project and verifies every link and page within your project. Beside that the PageBuiler has been rewritten recently in .NET and shows now a performance than before when configured properly.
There are two or furthermore three types of link elements:
During the publishing process within WSMS RedDot CMS referenced links are not followed by the PageBuilder and hence don’t produce a published page follwing this link.
Connected pages to links are recognized by the PageBuilder which picks up the publication package assigned to the link and according to the settings in this package the page gets published. If a page is connected multiple times in a project, not just referenced, this structure creates multiple pages with the same content.
We will convince the CMS PageBuilder that it is looking at a reference instead of a connected page link. The code for this is easy:
<%=Replace("<%list_teaser%>","islink=2","islink=10")%>
The only limitation here is:
What the code does is that it replaces the link type
Attention:
This code hides the link from the HTML structure. Although it is hidden now from the HTML it doesn’t stop the PageBuilder from following the link and publishing the page, so we have to replace the two link types as discussed above.
Render Tag Code? What do we do here with the Render Tag?
<%!! Context:Pages.GetPage(Guid:<%info_PageGuid%>).GetUrl() !!%>
This nice Render Tag sets the link URL to the MainLink of the page. If this is used everywhere all links will point to the same place and make sure that you won’t have duplicate content or unwanted sites published in the wrong place.
I am sure there are of course other ways to solve this issue and I am keen to read them below!
Interesting stuff, Markus – I’m probably going to have to read it one or two times over, just to get the gist! The page duplication issue is one we’ve been struggling with for a while now, and my preferred option has been to try to reduce the number of connections, in favour of referencing. Ideally, I’d like every page to be connected in just a single place: its main link. This should completely eliminate the problem, and has the added benefit of simplifying the SmartTree structure quite a bit.
Regards,
- Bobby
P.S. I tried to add this comment to your blog directly, but got an
error saying your spam filter has been configured to reject all
comments from behind proxies. Shame!
Shame indeed! I changed the SPAM settings in our plugin here and this will hopefully solve this issue! I also allowed myself to copy your comment over here if you don’t mind.
Beside this I believe it takes a fair bit of work to replace all the links in a project and change the settings where required. I found this useful where we use teaser boxes or sub content in the right hand side which is used multiple times in several sections of a website.
Thanks so much for this article. I ended up using the same concept to link our news releases when they are pulled in by keywords. Now we can pull in news releases from more than one location without forcing them to all publish to the same location as duplicates.
No worries, I am glad you like it. Credit for this piece of code goes to Tiffany France from the Virginia Commonwealth University (http://www.ts.vcu.edu). She remembered me of this option and I am happy to be able to share it here.
If your code should fall over and you have to debug it you should go check out this post on how to debug ASP in the Open Text CMS properly:
http://www.reddotcmsblog.com/debugging-pre-executed-classic-asp
Awesome post, unforunately, such workaround stopped working after the latest patch in 7.5, doesn’t work in any version of 9 or 10.
The rendertag .GetUrl() returns Url of type connected.
Hey Julio, can’t confirm this. I’ve done the above in a recent v9 project, more specifically:
Management Server 9 Build 9.0.1.29
I’ve got several pages connected below different main navigation pages in different levels. Those are connected to a teaserlist on the homepage with the described method above and are all pointing to the right place/URL.
What makes you think this doesn’t work anymore?
I’ve previously been doing this in a less than ideal way with RQL so I will happily try your approach instead. thx for sharing
No worries, I believe you were one of the guys who started sharing big time with your .NET wrapper
Does anyone know if this is true of v9 SP1 or v10 of the CMS? I’d be interested as we have potentially hundreds of sites that will use this system.
Hey Joel, what do you need to know? I can assure you that this method works in v9 SP1 and you can easily give it a try yourself on your v10 environment. Let me know if you need anything else.
Thanks for the article! Unfortunately, the pages are not displayed in the target container.
Do they still have an idea what we can do.
Hey Thomas, good point. I am sorry to say that this method only returns the MainLink to a page and doesn’t work with a target container solution. On that note I suggest not using target container because they are (in my opinion) deprecated and only have limited use based on this and other similar limitations. I know that this doesn’t help you but target container in my opinion do more harm than good most of the time.
Thanks for your answer, unfortunately, we now have the “container variant used” very intense. Have you any idea how to solve the problem of the double content.
or how to build complex pages without container.
dear markus,
we have solve the ‘target-container-problem’ with your great replace(…”islink=2″,”islink=10″)-solution, this works fine:
———————————————————————-
<%
strRefLink = Replace("”, “islink=2″, “islink=10″)
%>
<a href="”>…</a>
———————————————————————-
i’m a little bit confused about your … construct. for my understanding, this will never published (or pre-executed). have you seen this code-snippet in your preexcute-tmp-files (when you switch the flag-section in the rdserver.ini +256)? as a reference for the lists to pull some content from the following site will <!– –> also works.
best regards
tobias
At this stage not really, I would reconsider the target container approach and build the site based on Navigation Manager and simple container constructs. We never had a need for target container usage in our projects so far. Guess that is material for another article.
We are using a modified version of this on our site using target containers and it works fine. What we did was not use the render tag and instead use the ASP code that does the replace as the link (currently commented out in the sample code). This turned out to work perfectly and not publish any extra pages.
@Tobias, good point. The example above solves the same problem in two different ways. The list is required to get the elements but the ASP code is unnecessary if the render tag approach works for you.
Either way thanks to you Thomas and to you Nick for clarifying that with using the commented code above might be used as well to solve the issue when using a target container.
Thanks that was a very enlightening discussion.