Search code examples
javascriptasp.netwebdotnetnuke

How to change page title separator in dnn?


Currently, the default page separator in dnn page title is ">". i want to change it globally to a different separator like "|" or "-"

e.g. - "SiteName | Home " or "SiteName - Home"

how could i do this?


Solution

  • You can do it like this in javascript:

    document.title = document.title.replace(/>/g,"|"); // if you want it with |
    

    ( or )

    document.title = document.title.replace(/>/g,"-"); // if you want it with -
    

    Put that in window.onload

    window.onload = function(){
      document.title = document.title.replace(/>/g,"|"); // if you want it with |
    }