Developer forum

Forum » Templates » Organisation name as part of title tag

Organisation name as part of title tag

Siv Hansen
Siv Hansen
Reply

I'm new to Dynamicweb, so bare with me if the question I ask has been asked and answered before.

In my title tag, on all my pages, should contain 2 parts: the page title (or the meta page title) and the company name, so that when I bookmark a page, it says the page name and the organisation name (for example: Products and prices - Finnskogen Adventures). However, I don't want to write the company name on all pages. Is there a setting where the organisation name can dynamically be included in the title tag on all pages?

If my question is unclear, please let me know and I'll try to rephrase.

 

Best of wishes!


Replies

 
Nicolai Pedersen
Reply

Hi Siv

Welcome to the platform!

There is no setting to do it. But you can easily change the template to do it. Exactly how depends on how your template is implemented - there are a number of ways the title tag can be generated.

If you have a recent Rapido template set, go to /Files/Templates/Designs/Rapido/Master.cshtml and change

<title>@Model.Title</title>

to

<title>@Model.Title - Finnskogen Adventures</title>

And you are done.

An other option that will work for all implementations of titles is to use javascript - it needs to be inserted in the pages master or layout template just before the body end tag:

<script>document.title = document.title + ' - Finnskogen Adventures';</script>

Some customers care a lot about SEO - you might want to investigate their opinion on that before doing this, as this is not recommended for SEO purposes.

BR Nicolai

 
Siv Hansen
Siv Hansen
Reply

Thanks. Are you sure about the SEO purposes? My understanding of this is quite the oposite, as in Google adds the company name if not provided in the source code.

I don't know about other countries, but in my country, Norway, there are also universal design legislations, which states that "Sidetittelen legges inn ved hjelp av <title> innenfor <head>-elementet. Den skal inneholde en beskrivelse av den spesifikke siden og navnet på nettstedseier."  (translated: the page title is added witht the title tag inside a head tag. It should contain a description of the current page and the name of the website owner.", source Difi, Norway (https://uu.difi.no/krav-og-regelverk/losningsforslag-web/sidetittel-navigasjon). 

I assume this is an interpretation of WCAG phrase "Check that the Web page can be identified using the title". "product and prices" alone cannot identify any business.

I find it hard to  believe that our universal design laws contradicts SEO, but you never know with bureaucrats :)

 
Nicolai Pedersen
Reply

Hi Siv

SEO-wise - I guess it depends on what you want to achieve and what you SEO optimize for. There a lots of discussions on this if you Google it.

We also have the universal design guides here in DK, not a law, but they are targeted at public and state institutions and not private companies.

WCAG have a total different goal than a company that wants to sell...

In this situation, I believe adding company name to the title solves a small issue (who bookmarks these days??) and introduces a bigger issue - potentially worse SEO. But I'll leave it to the experts!

BR Nicolai

 

You must be logged in to post in the forum