Add site name to page title of each page
I am using Sitefinity 6.1 and want to simply add the sitename of my website to the page title of each page.
eg. <title>Page name - Sitename</title>
Is there a way to add this inside the master page? I am quite new to Sitefinity and have limited backend experience so any help would be brilliant.
I guess something like this in the page_load of the master page should work:
Sorry Arno, could you explain a bit more about the page_load. Should I see this somewhere in my master template? Thanks so much.
I assume you have a master page in the Visual Studio project of your website. That's where the page load event can be accessed. You'd best ask a developer to do so.
Yes Arno I have my custom site set up using a master template inside visual studio but there is no reference on this page to page_load that I can add your code. Can you give the full synthax as to how to achieve this?
You can try if this works for you (VB.NET syntax):
The "Page_Load" solution in the master file would be better in that respect.
In the top of your master page you could try something like this:
I added Sondre's solution to my master page's .cs file and it works! Didn't work in my master page file directly.