Websites & Language Layers
A Dynamicweb solution consist of one or more websites, and optionally one or more language layers.
- A website is a collection of web pages – documents accessed through the internet – such as the one you’re looking at now.
- A language layer is a website which structurally follows a master website – i.e. contains the same pages & paragraphs – but allows for the language layer content to be localized.
Each website and language layer then has a (large) number of properties associated with it, allowing you to control website behavior, appearance and interaction with the rest of Dynamicweb – and much more.
Read more below!
A Dynamicweb solution can consist of multiple websites and language layers.
To create and manage websites and language layers open the website management area of Dynamicweb:
- Go to the content area
- Open the context menu to the right of the website-selector (Figure 2.1)
- Click the websites node
This opens the website management view (Figure 2.2).
From here, you can create, configure and manage your websites and language layers.
You can also see the id, name, language, page count, active-state, total domain count and the primary domain for each existing website or language layer – and when it was last edited.
Right-click any of the existing websites or language layers to open access the right-click menu (Figure 2.3).
With the right click menu, you can:
- Click show to open the website
- Click edit to open the website settings
- Click copy to copy a website
- Click export to export an XML for translation purposes
- Click delete to delete the website
You may also access the website management view by going to Apps > Websites.
Website management tools
From the website management view, you have access to a number of tools for working with websites (Figure 4.1).
With the toolbar, you can:
- Create a new website or a new language layer – read more below
- Click the large Show-button to open the website or language layer selected.
- Sort your website management view (language layers can’t be sorted)
- Edit a website or language layer – taking you to the website settings view
- Delete a website or language layer
- Copy an existing website or language layer – read more below
Deleting master websites
Please note that master websites cannot be deleted before all the language layers have been deleted. This is working as intended.
Creating a website
To create a website, click the new website button in the toolbar (Figure 5.1).
You will be prompted (Figure 5.2) to name the website and select a regional setting.
Click OK – and that’s it. You’ve added a new website to your solution (Figure 5.3).
It’s a pretty useless website, though, as it has no content and has not been configured yet.
After creating a new website, you will usually need to:
- Configure the general website settings
- Configure the website Ecommerce settings
- Apply a design to the website – read more about designs and layouts here
After these steps, you will only return to the website settings on occasion, when a particular situation warrants it.
Copying a website or language layer
Copying a website or language layer is a convenient way of saving effort when creating new websites.
The copy-tool comes with a number of options for which parts to copy, e.g. permissions or website-settings only, giving you a degree of freedom when creating new websites.
To copy a website:
- Select the website/language layer
- Click Copy in the toolbar to open the copy website interface (Figure 6.1)
From the copy website interface, you must:
- Name the copy and select a regional setting (website language)
- Specify what to copy:
- Structure & paragraphs
- Structure only
- Website settings
- Decide if you want to update link references on the new website to point to the copied content, pages & global elements – or if they should continue to point to the original website. Normally, you want them to be updated.
- Decide if the website permissions should be copied
If copying a website / language layer fails, the details of the error can be found in Settings > Logs > System > Log > AreaService.
Once created, both websites and language layers must be configured.
To access the website settings, either:
- Select the website or language layer in the website management area and click the edit button
- Right-click the website and select edit
This will open the website settings view – and here’s an overview of the various configuration options you have available when editing the website settings.
Name & Regional settings
To start with, you can edit the name and the regional settings of the website (Figure 8.1).
Master pages also have a weird little checkbox called rename languages.
If you check this and save your website, all language layers will be renamed to: “[Master page name] (Language code)”.
With the details settings (Figure 9.1), you can control your domains and your 404-handling practices.
- Enter a number of domain names associated with the website
- Select a primary domain for the website – you can limit the primary domain so it will only be able to reach this website, not other websites on the solution
- Specify a HTTP 404 page to redirect visitors to if an URL cannot be found. The 404 page is only active for the domains specified above, and will be used instead of the one defined in your solution settings. This means that you can create separate 404-pages for websites and language layers.
The URL settings (Figure 10.1) allow you to view the URL associated with the website or language layer.
With the URL settings, you can also:
- Exclude the URL from appearing in subpage URLs – i.e. trim the URLS
- Check the Redirect first page to ‘/’ to prevent search engines from indexing your first page as duplicate content.
The redirect setting is only available if you use Location and page name (/Path/…/Page name.aspx)” as the URL type under Settings > Web & HTTP > Customized URLs. The setting also has no effect if:
- No domains have been added to the details settings
- No primary domain has been selected in the details settings
- The page has parameters in the URL
Content Delivery Network settings
You can set up CDN in your global settings, by going to Settings > Web & HTTP > CDN – but each website can also have a local setup (Figure 11.1).
With the Content Delivery Network settings, you may:
- Activate or deactivate CDN for the website – the host settings are disabled if CDN is deactivated
- Inherit the global settings – if set. If CDN is activated but the global settings are not inherited, you must provide an URL for the CDN host and an URL for the CDN host for GetImage requests
At the top the website settings page is the toolbar (Figure 12.1), from which you have access to a number of more advanced tools for website management.
From the website tab you can:
- Customize the robots.txt file content– see below
- Set up website permissions – read more about permissions here.
- Open the Ecommerce settings for the website – see below
- Select item types for extending the website or page properties on the website – read more about extending your website or page properties here.
- Override the general cookie settings on this particular website – read more about cookies in Dynamicweb.
- Configure the HTTPS settings for the website (requires a SLL Certificate):
- Default allows visitors to use both HTTP & HTTPS
- Force SSL forces a 301 redirect to HTTPS
- Un-force SSL forces a 301 redirect to HTTP
Export or import your website settings in a XML/Json file
The file is stored in Files/System/Items/Websitesettings
The file will contain the settings from the General section in Website settings including custom made items
The Robots.txt button opens the robots.txt settings (Figure 13.1), giving you a degree of control over how crawlers index your website.
- Allow or disallow crawlers access to the Google Sitemap for your website
- Include all products in the sitemap.xml (this requires a primary group on all products)
- Enter the content for the robots.txt file for the website
The contents of the Robots.txt file specified here should be considered virtual, e.g. an actual file will not exist on the disk. Instead it will be served by the 404 handler in Dynamicweb (Admin/public/404.aspx) which has to be set up in the IIS settings in order to work. If an actual robots.txt file exists on the disk, the virtual content specified in the field will not be used.
By default Disallow: /*?cartcmd=* is added to Robots.txt to avoid bots from indexing carts (the command is not visible from the Robots.txt input field).
The settings will not work on websites located on a *.dynamicweb.dk domain, as these domains are excluded from search engine indexing.
In Dynamicweb 9, sitemap.xml is html encoded - this is more in line with current SEO practices.
Website Ecommerce Settings
The website Ecommerce settings (Figure 14.1) allow you to configure a number of essential parameters when working with Dynamicweb Ecommerce on your website.
- Select a default shop
- Select a default language
- Select a default currency
- Select a default country
- Select a Prices with VAT configuration, controlling whether prices should be displayed with VAT by default. Basically, this is a way to specify at the website-level how prices should be displayed. This setting affects all price tags that have price tag extensions; tags like Ecom:Order.Price are affected, but tags like Ecom:Order.OrderLines.Total.Price are not affected. The state can also be changed using the PricesWithVat query string parameter, with the values true or false.
- None means the setting is not set (no state selected) - in practice, this is equivalent to selecting Yes explicitly.
- No means that VAT is not displayed on the frontend (e.g. for B2B websites)
- Yes means that VAT is displayed in the frontend, based on the most specific VAT rate set for the product
- Select a default stock location
Please note that the website Ecommerce settings are very important – even if you have only one shop, currency or language on your solution – as a number of tools and functionalities rely on the connection between e.g. a website ID and a default shop ID being made.
In fact, make it a habit to always configure the Dynamicweb Ecommerce settings when building a new website.
At the top the website settings page is the layout tab (Figure 15.1), from which you have access to a number of more advanced tools for website management.
From the layout tab you can:
- Select a website layout. A layout is an html-file containing the markup which controls the website layout. You can read much more about layouts in the designs & layouts article.
- Select device layouts for phones and tablets
- Select a default item page layout for each of your page-items
- Select a default item paragraph layout for each of your paragraph-items
- Specify which type of HTML you are using on the website
The Workflow tab
Finally, from the workflow tab you can select a workflow for the website - read about workflows here.
Language layers are identical to websites in all respects, but are created and maintained as structural mirrors of a master website.
This means that:
- Language layers contain the same pages and paragraphs as the master website
- New content created on the master website is instantly created on each language layer as well
This means that you are free to translate, add or delete any text or images within paragraphs, but that you are not allowed to create, copy, delete, move or sort either pages or paragraphs. The latter operations must be done on the master website, where they will be copied to all language versions. This will ensure that you maintain structural consistency between a master and its language versions.
To create a language layer:
- Go to the website management view
- Select the website you want to add a language layer to
- Click New Language in the toolbar (Figure 17.1)
This opens the New language window (Figure 17.2).
From the new language window, you must:
- Name the language layer
- Select a regional setting for the language layer – i.e. the actual language of the layer
- Decide if you want to copy the permissions from the master website
- Click OK to create the language layer.
You can edit the website settings of a language layer in the standard manner.
Switching between websites/language layers
Once you have more than one website or language layer on your solution, you can switch between them by openening the website selector (Figure 18.1).
With the website selector, you can:
- View the currently selected website – here Master website
- Select one of the language layers under a website – here Danish, French & German
- Select a separate website – here MonSiteInternetTrèsChic or Restaurant
You can also switch between language layers when on a page or paragraph.
Advanced Language Layer settings
Remember when I wrote that you cannot create new paragraphs from a language layer? Yeah, about that… I lied.
Using the Language Management settings, you can change or customize several aspects of working with language layers.
|Field name||Data type||Length|