Best Practice | CMS Blog Watch

Best practice

How to integrate ASP.NET into RedDot CMS projects – Best practice on .NET template embedding

Posted in ASCX, ASPX, Best practice, CMS, RedDot, RedDot templates, Render Tags, Templates, Templating, User Controls, asp.net, temp on March 8th, 2010 by Markus Giesen – Comments Off
Integrating Microsoft ASP.NET into RedDot CMSIntegrating Microsoft ASP.NET into RedDot CMS
Learn it the right way here

Is it easy to integrate .NET into your RedDot CMS project? Yes it is, if you know how and obey some simple rules. This article gives you a best practice on how to include any .NET functionality for your published website within your RedDot CMS templates.

If you can avoid using inline code within your RedDot Content Classes then do it

Inline code within a content class can’t be versioned as it could be with a version control system when developing standard .NET solutions outside of any CMS. You can’t develop or test properly using inline code within the CMS. Whenever you have to change the .NET part of your project you would need a RedDot Consultant or some of their knowledge and hence your project doubles up on resources. Don’t integrate inline code within your CMS.

Let the CMS handle content – Don’t care about the rest

There is a clear understanding of what your CMS should handle for you – your content – and what it should not take care of – styling and dynamic functionality may it be Javascript, .NET or any other scripting technology. The CMS is your data storage and management layer, the web server is your presentation and visualization layer and hence it is the point where dynamic functionality, styling and user interaction takes place. By keeping those parts separate you ensure to have a stable, scalable and furthermore easily maintain- and upgradeable Content Management Solution. Read more on this topic here

Example – How to integrate .Net properly using User Controls

Instead of just adding a page directive followed by your inline code you should use user controls. Given that your code will be used on your website and not within the Open Text CMS ASP.NET User Controls are the best way to embedded dynamic functionality within your project.
There are basically two points where .NET is included in your template. The first one needs to be in every template which uses User Controls unless you integrate it using a container. The second one works as placeholder for the .NET functionality:

Referencing .ascx files and placing User Controls within templates
Read more »

Share and Enjoy:

Print
email
Twitter
Digg
Reddit
StumbleUpon
Google Bookmarks
del.icio.us
MisterWong
Facebook
LinkedIn





5 Template Tips – How to use HTML and CSS within RedDot CMS – Best practice for RedDot Consultants

Posted in Best practice, CMS, JavaScript, RedDot, SmartEdit, Templates, Templating, Tricks, css, html, integration, jquery on March 1st, 2010 by Markus Giesen – Comments Off
Merging HTML, CSS and RedDot templates - How to do it the right way?Merging HTML, CSS and RedDot templates
Read how to do it the right way.

This article covers the key factors for successful CSS and HTML integration into your RedDot CMS Open Text Content Management Server project. This best practice article outlines the major points to pay attention to when implementing your HTML into the CMS.

What you should do when you integrate HTML and CSS into your content class templates

  1. If you can avoid it, do not create templates for your CSS or Javascript files. A detailed post can be found here.
  2. Don’t target HTML elements directly within the CSS. Always use classes. Specifically with anchor, image and span tags. If you target HTML elements directly this might affect the red dots which will be placed inside the templates because they are anchors, images and spans.
  3. Always target the ‘first’ item in a collection of items (lists, repeating blocks, …) by using a CSS class. Within the RedDot CMS you can identify the first item in a list using ASP and PreExecute script blocks but not always can you identify the last item. Especially when the amount of items is varying and you cannot utilize Render Tags.
  4. Ensure dynamic HTML is accessible when switched off. Using Javascript code within the CMS editing view can be problematic because it can hide editable content. Ensure that when using dynamic scripts the content is also visible when Javascript is deactivated. For example when you are using jQuery with tabs and your CMS editor changes content, the page reloads when the element is being saved and the user has to open the tab again. It’s better to deactivate the tabs when the page is ‘open’ and in SmartEdit editing mode.
  5. Files such as background images, styles heets, javascript and others need to be referenced relative (../mystyle.css) rather than root or absolute referencing (/cms/projectfolder/folder-not-working-on-live-site/mystyle.css). RedDot CMS has its own folder and sub folder structure and during editing it can’t use absolute referenced style or JS files and will mix those up.

Summary

RedDot CMS is a fairly easy to use system when it comes down to templating. I am not saying it’s straight forward or a technological top notch solution. It also is not meant to be an IDE. The good thing to say about the CMS is that the elements are modularized to each single HTML object and can be used in an infinite number of ways. Pay attention to the best practice rules above and think about where your files and references will be used. When using the guidance above the HTML of your project will run smoothly on any platform and publishing target.

What is your RedDot CMS Consultant integration experience?
How do you use HTML and CSS within the RedDot CMS?
Have you ever had any trouble or even an “CMS integration epiphany”?

Read more RedDot CMS best practice articles here.

Share and Enjoy:

Print
email
Twitter
Digg
Reddit
StumbleUpon
Google Bookmarks
del.icio.us
MisterWong
Facebook
LinkedIn





LiveServer Setup Best Practice – How To Tame The OpenText Delivery Server

Posted in Apache, Best practice, Delivery Server, Helicon, IIS, LiveServer, Performance, RedDot, Tomcat, URL Rewriting, seo on February 22nd, 2010 by Markus Giesen – Comments Off

About the Author

This article is based on the blog post here of Danny Baggs. Danny has a strong developer based background and is working for Open Text.

Overview

The way the LiveServer Delivery Server is set up for a development environment usually is as a standalone application without having a front controlling web server. Although this is working for development purposes it doesn’t work within a live environment with several thousand users firing off HTTP requests every hour or minute or even second.
This post discusses the best practice of deploying the Open Text Delivery Server in an optimal way alongside a front controlling web server. This article provides a high-level overview of what to set up and how the necessary components work together. Depending on feedback I may post further posts on the details of each step.

After reading this article you will know

  • How to set up your LiveServer environment properly to ensure it is scalable, reliable and offers high performance
  • Which tools you can use to create dynamic functionality
  • How you can tweak your LiveServer to gain some SEO enhancements

How does Delivery Server work and what should you not do

The Open Text Delivery Server is a dynamic web server component that has strengths in coarse grained personalization and dynamic behaviour as well as system integration. All you need to know is where to get your hands on and what to do and what you better should not do.
The Open Text Delivery Server is housed within a Servlet Container. A Servlet Container is not the ideal location from which to serve static content. It handles requests in a way that limits the amount of concurrent requests. This can lead to severe performance issues.
There are ways to mitigate this but it needs quite a lot of Java experience and is still not recommended. Unless you wish to maintain a level of access control over the static content let’s put it simply like this:
Don’t run the Deliver Server as a standalone web server.

Next: What do you need to get Delivery Server running?
Read more »

Share and Enjoy:

Print
email
Twitter
Digg
Reddit
StumbleUpon
Google Bookmarks
del.icio.us
MisterWong
Facebook
LinkedIn





7 reasons not to integrate CSS into RedDot CMS – A best practice

Posted in Best practice, CMS, RedDot, Render Tags, Templating, Tricks, css on February 8th, 2010 by Markus Giesen – Comments Off

Another big question that comes up every couple of weeks when people start developing websites with the RedDot CMS Open Text Web Solutions Management Server is this one:

How should I integrate my CSS code into the CMS?

And the answer is fairly easy to give and even easier to remember:

Don’t do it. Do NOT integrate your CSS code into the CMS !

It took me several projects to actually reach encounter this epiphany. It’s not worth doing it. And there are several good reasons for not doing it. And I will share them with you, more than happy to discuss it.

Since last year I suggest the following procedure for every project I come across:
Remove the CSS templates and related images to style your site from your project and put them outside of the template and therefore outside of your CMS logic.

A template is meant to semantically structure the stored data from the datasource (a database or sometimes even just XML files). We call this environment a CMS – Content Management System. The presentation layer for this content is formed by those templates and the combined usage of style sheet files. This methodology is similar to XML and XSL, where one stores content, the other defines the way to present it.

Don’t integrate CSS into Content Classes » Markup arguments

  • CSS is not a template

    Keep in mind style sheets are NOT templates. CSS influences the way content is presented graphically. CSS is not responsible for the semantically correct markup. There is a reason why it is called “content class” inside the CMS. Because it’s about content.

  • Background images are no content

    Images such as background images, bullet points, logos, etc. are NO content, they are a way to present content. Hence they don’t belong inside the CMS template structure. They do not help you manage the content nor do they store any valuable information for your visitors which you want to change as CMS editor.

  • Border or Shades are no separators

    A border below a DIV or a headline is not a separator, a separator is a horizontal ruler set in the HTML by using a <hr>-tag and. That’s how content is semantically correct separated not using the content elements borders.


Don’t integrate CSS into Content Classes » Process & Budget

And if these three semantic reasons are not enough for you then here are another four development reasons why you should not mix up CSS & templating.

  • It takes more time

    Changing a value in a CSS file takes about 5 minutes. In RedDot CMS you have to do this: Open your CSS template, change the value, publish it to your staging server, test the result, go back to the CMS, if required make some changes, publish again to the staging server, then test again – repeat this step until you have the desired outcome, then – publish the file to your live environment, done.

  • It doesn’t work fast enough with international projects / shared RedDot projects

    When using shared content classes for several projects they develop over time different layouts. Some marketing departments want slightly separate styles and your CMS construct starts to get cracks and you have to add an special CSS template here and another one there. Keeping styles separate from projects gives you more options to change them faster without having to pay too much attention to all depending projects.

  • It gives you more flexibility

    Assuming you have multiple projects and you run a style change on all of them. You have to test each change which works for Project A also in Project B, C and all the others. And you have to wait for all of them to be changed in the development process until you can start testing because they still might change in the background if you start testing before the last change has been made

  • It adds more stability

    Your presentation layer should be static. Whenever your content gets published usually the styles heet files will get published too if they are part of the template set. Content changes approximately everyday in your company.
    How often does the style change of your project? Exactly.
    Why would you re-publish this everyday risking that it might fall over because editors have the ability to influence your companies CI? They don’t have access to it? Fine then again, remove the CSS from your project.

What should you do instead?

  • Use a proper set of HTML templates before you start setting up your RedDot CMS project. Each final page template in the CMS should have an according HTML template. (If you didn’t go down that path yet it’s about time to set it up now, it safes you a lot of maintenance time and stress)
  • Develop, test and maintain CSS changes in these HTML templates. If you find out that entered content in the CMS affects the way your site renders then test it in here and create an example page. It’s faster to test these pages in all browsers anyway.
  • Once your development & testing is ready set up your project or update your existing project. A good place for your CSS files is the plugin folder of your CMS.
  • Create a folder for each project inside the plugins folder and place the CSS folder structure and relevant files in there.
  • Do the same by manually deploying the CSS files to your web server.

In your RedDot CMS project reference to the CSS files on your RedDot server when parsing the template code. For published files reference to your website CSS. This can be done by using render tags as described here.

How could Open Text tackle this issue

Open Text could easily integrate a CSS file compressor. This module takes the set of referenced CSS files and compresses them as one single file. It also reads out the image references. The compressed file and the image reference then will be attached to a publishing process. A file watcher checks for updates on the CSS files / CSS images. Whenever the CSS files change the compression / publishing process takes place.
This module can be switched off for development purposes and specific publishing targets. The RedDot CMS is NOT an IDE and should not be used to develop or maintain HTML and CSS changes. This module would be a great enhancement.

What do you think? How do you use CSS within RedDot CMS and what is your best practise for this?

Share and Enjoy:

Print
email
Twitter
Digg
Reddit
StumbleUpon
Google Bookmarks
del.icio.us
MisterWong
Facebook
LinkedIn





Extending Open Text Delivery Server with your own Java Classes

Posted in Best practice, Delivery Server, Featured, Java, Java Classes, LiveServer, Open Text Delivery Server, RedDot on February 1st, 2010 by Markus Giesen – Comments Off

Guest writer Marek Korch, RedDot/Open Text Consultant at infinity-group.pl in Poland and working for clients like BNP Paribas Fortis, Dan-wood, Allianz and Nordea. He enjoys new challenges in Open Texts Management / Delivery Server systems and learning new things around the ECM world and how to improve them. He also just started writing on this blog.

In this article we will show you how to find the right files to extend Open Texts Delivery Server (formerly known as RedDot LiveServer) with your own Java classes.

You might have worked with LiveServer DynaMents before and sometimes you just wish you would have that special method or a nicer way to process this bit of information but the existing set of Delivery Server DynaMents just doesn’t exactly fit your needs. Therefore here comes your LiveServer tutorial for including your own Dynaments inside of LiveServer.

If you want to start your own adventure with DynaMents and inline Java functions which will extend the DynaMents functionality, you’ll need to go through the following steps:

  1. Prepare the LiveServer (Delivery Server) environment
  2. Prepare the java package and the java class files
  3. Create your own class which you want to use to extend the built-in java classes

Prepare the LiveServer Delivery Server environment

First of all check your Delivery Server version and build. I was working on LiveServer (Delivery Server) build 4.0.0.8 but it’s recommended to upgrade it to LiveServer 4 SP1. Of course it is not necessary to upgrade your LiveServerS/Delivery Server, but it makes things easier if you are able to go with the upgrade as you will see below. (Always keep in mind to check the release notes and check issues affecting your environment. LS 4 for example has a known defect with updating/connecting to Active Directory which is yet about to get fixed)

Prepare the java package and the java class files

Finding the classes on your LiveServer environment can be a bit tricky, to create your own Java class file you will have to import one very important class package which is built in the LS. The class is called:
de.reddot.xmaps.dynament.DefaultInlineFunctions;
There are two ways to find it and to import into your class package during the compilation process:

A) Especially recommended to use if you have LiveServer without SP1, is to import the above mentioned class into your java project in which you will compile your own class. To accomplish that, simply import the JAR file with the necessary class which is located in
<LiveServer_Install_Directory>\\tomcat\\webapps\\cps\\WEB-INF\\lib\\rdls-rde-x.x.x.x.jar

x.x.x.x corresponds to a build version of LS. In my case it was rdls-rde-4.0.0.8.jar.

B) If you already have LiveServer running with the SP1 updgrade, you can find the necessary class in
<LiveServer_Install_Directory>\\tomcat\\webapps\\cps\\WEB-INF\\classes\\de\\reddot\\xmaps\\dynament\\DefaultInlineFunctions.class

Create your own class which you want to use to extend the built-in java classes

The Next step is to prepare a definition of your own class. It should looks like this:

// ############################
package com.company.package;
import de.reddot.xmaps.dynament.DefaultInlineFunctions;
public class ExtendedInlineFunctionsClassName extends DefaultInlineFunctions{
         public String function(String value, ...ANY OTHER VARS DESIRED){
                   String mustReturnAString=value;
                   return mustReturnAString;
         }
         //called inline like [#source:attribute#].function(...ANY OTHER VARS DESIRED)
}
// ############################

After that, all you have to do is to compile your own class file with your function(s) and then copying it to to the classes folder on your LiveServer directory:
<LiveServer_Install_Directory>\\tomcat\\webapps\\cps\\WEB-INF\\classes

And Voila! Based on that you are ready to go. Create your own Java methods and use the according DynaMents in your LiveServer project.
Questions? Ideas? More LiveServer enhancements? Use the comment box below!

Share and Enjoy:

Print
email
Twitter
Digg
Reddit
StumbleUpon
Google Bookmarks
del.icio.us
MisterWong
Facebook
LinkedIn





How to get a tidy website

Posted in Best practice, CMS, Featured, RadEditor, RedDot, RedDot text editor, Standard, Telerik, Tricks, tidy, xhtml on November 9th, 2009 by Stefan Buchali – Comments Off

Whenever a page or an entire website is published, there is the problem of producing valid XHTML code. Let’s face it: Open Text Websolutions is not (and RedDot CMS was not) the most eager CMS in the world to achieve this goal.
Some open source solutions (e.g. WordPress ;-) ) do a better job.

So what can we do? Since nearly everyone is able to easily create a standards compliant webpage, Open Text and us partners have to cope with a big challenge in explaining why an expensive system is not as good as a free one.

So there are two goals for us:

  • Give the users the freedom of formatting they expect
  • Show your fellow keep-to-the-code developers that you don’t consider the standards just for more or less guidelines.

Are you ready? Let’s go…

Just ASCII for the editors?

First of all, let’s have look at where do the problems come from:
Assuming that we developers are able to program tidy and standards compliant templates, there is only one source causing all of our problems: The text editor!

Uppercase tags, mso-styles and incorrect empty tags like <BR> instead of <br /> spread our code that was once so beautiful.

So the most simple way to avoid all of that would be to keep the editors away from anything where they could produce one single tag without our control. This ends up in denying them to use the text editor, at least the “not in ASCII mode” one.
But I have never seen a project like this…

Use tidy

Another good way to publish standard compliant web pages is to use tidy. Simply activate it in your project variant settings and all problems are gone!

Well, almost all:

  • As tidy will not only touch code from the text editor but the whole page, you will sooner or later run into the situation that it also changes some of your template code while publishing.
  • If you publish just static HTML, tidy may help you a lot.
  • If you publish server side scripts, too, it might interfer a lot and make very harmful changes!
  • Tidy checks and corrects the published code which is transferred to the web server. But this code does not necessarily need to be tidy yet – just the code the web server finally send to the client has to be!
  • Never use it in a LiveServer (Delivery Server) project! It will strip out all of your nice Dynaments as it does not recognize them (when in XHTML mode – I did not try out one of the other modes). If you start to declare these tags (you can of course configure tidy), it will keep them in the BODY, but not in the HEAD.

At this point, I did not investigate any further.

Use another text editor

Version 9 introduced Telerik RadEditor as a new approach. This seems to be a good and well integrated tool that produces really cool tidy code. Good for brand new projects. Changing a running project can be a bit tricky, but the main problem is that you would have to open and close every single text element to see the effect, however.

And there are some issues around, which have been discussed yet in other posts here.

Use a conversion table

Have a look at the /cms/asp folder of your server. There you should find a file named HtmlConvertTable.txt.

It’s a simple plain text document containing tabulator separated strings. Matches left will be replaced by the text right. It has been used in ancient times (before unicode) to convert these strange characters like our german umlauts to their corresponding HTML entity (e.g. ä became ä).

The great advantage of this solution is that it only changes the content of elements, but not one single character of the template code!

In your project variant settings, you can choose between three options (section Conversion of RedDot content):

  • Do not convert characters (I think this means in fact: use the standard file HtmlConvertTable.txt if the element is not set to "Do not convert characters to HTML")
  • Convert characters to XML (changes just these five characters: &, ", <, > and ‘ – but all and everywhere)
  • Convert characters to the following file format (followed by a text entry field)

So let’s create a conversion table for XHTML code, save it to the /cms/asp folder of your server, name it e.g. HtmlConvertTableXhtml.txt and enter this file name into the text entry field.

Into this file, write down all uppercase tags to the left and the corresponding lowercase tags to the right, separated by a tabulator.

Here’s a little example (when you copy it ensure that you get the tabulators right):

<BR>	<br />
<IMG 	<img
<P 	<p
<P>	<p>
</P>	</p>
<A 	<a
</A>	</a>
<STRONG>	<strong>
</STRONG>	</strong>
<EM>	<em>
</EM>	</em>

Very simple, but powerful. What do we see in this example?

  • You must list both the start tags and the end tags.
  • Some start tags appear twice, because they exist both with and without attributes.
    Attention: You should then note the version with attributes with a following space to avoid unwanted conversion of other tags starting with the same character or string.
  • You can also list any attribute to be converted.
    Attention: Don’t list the href attribute, because this confuses the pagebuilder – internal links will no longer be published!

You can list the ampersand, too, of course, if you do it as follows:

 & 	 &

Both the left and the right one must have a leading and a trailing space to ensure that only the ampersands standing alone will be converted and not those which are already part of an entity.

Last but not least you can convert deprecated tags into a standard compliant way:

<NOBR>	<span class="nowrap">
</NOBR>	</span>

The behaviour of the “nowrap” class is then defined using CSS.

In my experience so far, this solution delivers the best results for projects using the built-in RedDot text editor (I’ve tried it with version 7.5), although it’s not possible to convert all tags. For example, you cannot convert empty tags that must have attributes (e.g. img) into their XHTML variant.

That’s it. Now I’d like to hear about your experience with this.

Share and Enjoy:

Print
email
Twitter
Digg
Reddit
StumbleUpon
Google Bookmarks
del.icio.us
MisterWong
Facebook
LinkedIn





Breadcrumb Navigation With Render Tags

Posted in Best practice, Breadcrumb, CMS, RedDot, Render Tags, Tricks, base page templates, css on November 2nd, 2009 by Markus Giesen – Comments Off

Taming the beast that Open Text so frankly called ‘Web Solutions Management Server’ we have some pretty nice tools available since version 7.1. Render Tags are a quick and effective way to create navigation elements like this breadcrumb navigation below.


    
        
            
  • <%!! Context:CurrentIndex.Headline !!%>
  • <% currentDepth = <%!! Context:CurrentDepth !!%> %>
  • <a class="first" href="<%!! Context:CurrentIndex.GetUrl() !!%>" title="<%!! Context:CurrentIndex.Headline !!%>"><%!! Context:CurrentIndex.Headline !!%></a> /
  • <a href="<%!! Context:CurrentIndex.GetUrl() !!%>" title="<%!! Context:CurrentIndex.Headline !!%>"> <%!! Context:CurrentIndex.Headline !!%></a> /
  • A pretty nice piece of code. It creates a breadcrumb navigation with several CSS class names, giving you many options to style the whole thing very detailed.

    Embed this in your project

    1. Put it in a separate template
    2. Create a container (for example ‘con_breadcrumb’) in your MasterPage(s)
    3. Create ONE instance of the breadcrumb template in the container inside the homepage template (you don’t need to place the container in the HTML of your homepage it’s just a good place to store unique project wide pages)
    4. Reference the ‘con_breadcrumb’ container in your homepage page to all MasterPage templates (and if required to all already exisiting pages – thankfully there is a plugin available from Open Text for this, just ask them!)

    Done.

    Credits

    I asked Neil Fegen, if I can use his enhanced version of the script from Ingo Hillebrand who came up with it last Friday on the RedDot Google Group. Thank you guys for sharing this stuff with us!

    Share and Enjoy:

    Print
    email
    Twitter
    Digg
    Reddit
    StumbleUpon
    Google Bookmarks
    del.icio.us
    MisterWong
    Facebook
    LinkedIn





    Duplicate content publishing – SEO and Open Text Web Solutions

    Posted in ASP, Best practice, CMS, Featured, MainLink, PageBuilder, RedDot, RedDot CMS Shortcuts, Render Tags, Tricks, publishing on October 26th, 2009 by Markus Giesen – Comments Off

    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?

    Why does it happen?

    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.

    Different link types

    There are two or furthermore three types of link elements:

    1. References
      they just reference/point to the origin place where a page “lives” within the project and
    2. Connected pages
      which can be expanded in SmartTree and are ‘truly connected’ to the link element
    3. Mainlink
      One exception is the Mainlink, this is the place where the page usually has been created at first and it defines the place where the page really lives in the CMS project.

    What happens during publishing?

    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.

    How do we solve multiple publishing?

    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:

    • The link element needs to be set to ‘insert path- and filename only’.
    • The code block runs in a prexecute so that the code is executed and returned as html when published

    What the code does is that it replaces the link type

    • 2 = link, follow and publish the site based on the publication package attached to this link element
      to
    • 10 = reference, don’t follow this page and don’t publish it, just use the MainLink the page is connected to

    The (almost) ready to go template code

    
    
    

    Attention:

    • Don’t forget to wrap the code above in a pre execute
    • The RenderTag in the href=” ” doesn’t show up properly in so replace “RenderTag” with the tag above as described in the comment

    EXPLANATION: So what does this all do?

    
    

    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.

    Other ways?

    I am sure there are of course other ways to solve this issue and I am keen to read them below!

    Share and Enjoy:

    Print
    email
    Twitter
    Digg
    Reddit
    StumbleUpon
    Google Bookmarks
    del.icio.us
    MisterWong
    Facebook
    LinkedIn



    Export RedDot CMS content to Excel

    Posted in Best practice, CMS, Excel, Export, RedDot, Tricks, content class, instance on August 21st, 2009 by Stefan Buchali – Comments Off

    Very often when maintaining sites in RedDot I get to the point when it becomes necessary to change or delete content elements, e.g. the default value of an image, or an entry of an option list, etc.

    But doing so on a living project can get you into big trouble if you do not first check the consequences that this action will cause!
    So what can we do to get a quick overview of the status of all pages based on a certain content class (that is what we need to get an idea of these consequences)?

    The thing I prefer and what I would like to share today is using the Export Instances function, which can be found in the Action Menu at “Administer Content Classes” – (CK folder) – (CK) – “Instances”.

    Export your instances

    1. RedDot displays a dialog where you can enter some search criteria for the export. Though it is possible to enter nothing and to export all instances, you should fill in at least both “Instance ID” fields (from / to).
      Attention: The default value for the “max. results” field is set to 50, so set this value appropriately! Do not select “Export all Instances” (even if you exactly want to do this), for this will not work properly.
    2. Click “Start” and select an export target from the next dialog page. I prefer to export into a local folder on the RedDot server.
    3. Select all instances and click “OK”.

    Every page/instance will be exported as one XML file. These files have the following structure:

    <?xml version="1.0" encoding="UTF-8"?>
    <CONTENT_CLASS_NAME>
    	<ELEMENT_NAME type="element_type">ELEMENT_CONTENT</ELEMENT_NAME>
    	...
    </CONTENT_CLASS_NAME>
    

    The type attribute indicates the kind of element (standard field: 1, image: 2, option list: 8, etc.) as documented by RedDot. Some elements may have more attributes (e.g. images).

    You will receive an e-mail as soon as the export is finished.

    Collect them into one XML file

    Open the command prompt (”Start” – “Run…” – enter “cmd”), go to the export folder and run the following code:

    type *.xml > instances.xml
    

    Open this file with a text editor and make it well-formed XML:

    • Delete all XML declarations except for the first
    • Create an arbitrary root element
    • Double check the elements’ content for well-formedness, use CDATA sections if necessary

    Regular expression experts can also delete all type=”…” attributes ;-)

    Edit, use or share it

    Well, that’s all. Open the file with an XML editor or import it with Excel and do whatever you like or have to…

    Share and Enjoy:

    Print
    email
    Twitter
    Digg
    Reddit
    StumbleUpon
    Google Bookmarks
    del.icio.us
    MisterWong
    Facebook
    LinkedIn