Configuration

How to configure a multi-lingual site in Ektron

Ektron CMS is a fully multi-lingual product that allows multiple different language versions of a content item to be created.  As of version 8.5 you can also create regions and add custom languages.  Even without the features of v8.5 you can still create multi-lingual sites easily.

When beginning an Ektron project that requires multi-lingual content, first decide whether you are running one domain or multiple domains.  Some organisations like to have one domain such as http://www.theglobalfund.org and within this domain the user can select the language that they wish to view the site in.  Other organisations such as http://www.selecta.co.uk/ provide region/country specific websites which may or may not then provide the option to choose a language.

Single domain multi-lingual sites

Having just one domain is certainly the easiest to implement but is not sufficient for organisations that wish to have a regional presence.  If you have just one domain you would typically provide a language switching control on the page which can use either the CMS LanguageAPI control or some custom API code.

With one domain, many websites will use a language identifier as part of the url; for example http://www.mywebsite.com/en-gb.  This can be achieved using Taxonomy automatic aliasing; the top category in your taxonomy would be “en-gb” and within that would be your information architecture.  Taxonomies themselves are multi-lingual so can be translated.  The “en-gb” taxonomy would be translated into “fr-fr” for French (France) and “fr-ch” for French (Switzerland).  If you also setup your taxonomy folder relationships then content can be auto-added into the taxonomy meaning your multi-lingual aliases are completely automatic!

A language identifier in your alias is useful as it helps to prevent different language versions of content items having the same alias.

Multi-domain multi-lingual sites

Ektron CMS provides a means to manage many websites from a single CMS installation called Multi-site.  Essentially you have more than one IIS website, each with its own web root but only one database.  The reason behind doing this is so that each website can have its own default language.  If you had http://www.mywebsite.de, chances are you want the default language to be German.  The CMS sets the default language of a site within its web.config file.  As you can only have one web.config file per .Net website this means you need separate sites in IIS.

So you would first install the “parent” site – this is the base to which all of your multi-sites are added.  The parent site would hold common content that is shared amongst the other “child” websites.  Each of the child multi-sites are then added using the dedicated Ektron Multi-site installer.  The child multi-sites also have to be configured within the Workarea by right-clicking on the root folder and choosing “Add Site”.

Remember that any content you add within the child site folder in the Workarea will have the domain of the site added to the start of the QuickLink.  This only happens within multi-site folders.  If you do not want this to happen then add the content to a non-multi-site folder, i.e. a folder belonging to the “parent”.

It is your choice whether these sites have their own ASPX templates, controls and PageBuilder wireframes.  Usually the physical files are the same so that organisations have a consistent look and feel across websites even if the domains are slightly different.

For more information on Ektron multi-site see here.

Disable Language Awareness

It is worth mentioning that your Url Aliasing settings.  In the workarea, go to Settings > Configuration > Url Aliasing > Settings and check the “Disable Language Awareness” button.  I find the wording of this setting to be confusing.  When “Disable Language Awareness” is checked you can browse to an alias from a non-default language piece of content.  If it is not checked then the CMS will attempt to load the alias using the default language – so if the alias does not exist in the default language you will get a 404 page not found error.

Time to add content

So you should now have an idea for how to approach setting up Ektron CMS for multi-lingual websites.  You may want to review Ektron’s documentation on multi-lingual content to make sure you have all bases covered; there are other items such as menus, images, taxonomies, etc to consider.

Security: Change default passwords in Ektron

When an Ektron site is installed for the first time it includes default users with default passwords set.  A very important security aspect of the CMS is to change these passwords before you go live.  It might sound obvious but you would be surprised how many sites there are with the default passwords still in place!

The following users are available in a default Ektron installation :

  • Builtin
  • Admin
  • jedit
  • jmember

The default password values are the same as the usernames, i.e. builtin is “builtin”, admin is “admin”.

The builtin user is often neglected due to the fact that it is found in a different place to the other users.  For reference, you can find the builtin user in the Settings > Configuration > Setup page (same page as where the license key lives).

Change those passwords!

Improve Ektron compilation performance

The vast majority of projects I build using Ektron are built using the WebSite model (as opposed to the Web Application model). During development I will obviously make lots and lots of changes to code which in turn will cause a lot of compilation to take place.

A quick tweak to the web.config file can improve the performance of compilation by making it more selective.  If you update your web.config file like so:

<compilation … batch=”false”> …</compilation>

This will instruct .Net to only compile the code that it needs to and can speed up the time you wait around for the compiler.  If, like me, you have a slow computer you will really appreciate this!

Another added benefit of this is that it will stop a certain type of .Net error from occurring that you have probably seen at some point.  That error looks something like:

ASP.net Error: The type "xxx.dll" exists in both AAA and BBB

This error tells you that a class exists twice in the temporary .net files folder:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

By adding batch=”false” this error will go away.

So thats two Ektron tips in one!

Edit : I should point out that this setting should be used in development environments only.

Make all aliases lower case

Aliasing helps Ektron websites to provide friendly URLs that are readable and search engine friendly. Automatic aliasing is a time saving device that creates the friendly URLs based on either taxonomy or folder structure.

A common issue is that aliases usually need to be all in lower case whereas taxonomy and folder names will have mixed case. This can cause problems with SEO because search engines will interpret the mixed case and lower case URL as being different pages even though they link to the same page.

A good way to resolve this is to use the Microsoft URL Rewrite plugin for IIS7. Once this is installed a new option becomes available within the IIS Manager called “URL Rewrite”. The rewriting can be applied to the whole site – one important exception to this is to exclude the workarea.

Once URL rewrite is installed, go to IIS Manager, click on your site’s root node and then double click on the URL Rewrite icon in the IIS section. Next click “Add Rule” and a dialogue window will open. Select the “Enforce lowercase URLs” option in the SEO section and click OK.

Now go to the workarea folder in IIS, open URL rewrite and remove the rule. Otherwise you will get strange behaviour from the menus in the workarea.

Remove buttons from the editor toolbar (ContentDesigner)

Ektron’s WYSIWYG (what you see is what you get) editor (a.k.a. ContentDesigner) is a fully featured XHTML editor. You will know that by default there are lots of toolbar icons present. Many of these are intended to imitate word processing applications so as to provide a familiar interface to users.

However, it may be the case that you do not wish to have all of the buttons, say if you want to simplify the interface. No problem!

Browse to this folder in your website : /Workarea/ContentDesigner/Configurations. Within this folder you will see a number of ASPX, CS and XML files. The ASPX files actually contain XML and define the toolbar items that are available in each “mode” of the editor. Each ASPX file corresponds to a “mode”, i.e. DataDesign, DataEntry, etc.

When you open the XML file you will see a number of /tools/tool items – these correspond to the items on the toolbar.

There is a more in-depth article on the Ektron DevCenter which also shows how to add in custom options.

Use resource files to store important ID numbers

Ektron CMS projects should be built to be dynamic and as easily configurable as possible. The best CMS sites allow the administrators to configure the site without having to delve into any code.

However, from time to time, as a developer, you will need to set ID numbers such as Smartform IDs or Folder IDs. These ID numbers are often used with API calls. Its a bad idea to code these ID numbers directly into your C# or VB code as it means only a developer can change them.

Folders and Content Items get deleted all the time so you don’t want to have to edit code when it happens!

A good way to approach this issue is to create a .Net resource file and add your unique IDs into it. That way you can just access your ID numbers by referring to items in the resource files.

For example:

Resources.MetaData.AdvertBlockId

Set default page to use an alias

Every Ektron project I work on will use aliasing to help provide friendly URLs, whether it is Manual, Folder or Taxonomy aliasing. This usually means the home page has an alias too. If you have ever tried to set your default page in IIS to an Ektron aliased page you will know it doesn’t work. Instead you need to make a small addition to your web.config file:

<urlMappings enabled="true">

<add url="~/" mappedUrl="~/my-alias/"/>

</urlMappings>

The above XML needs to be pasted into the system.web section of your web.config file.