Dynamic title of an website

  • fahim45
    Likes 1

    Problem Description

    How can i make a dynamic title for my website. suppose,

    • for index.php page >  title: Home
    • for document.php page > title: Document
    • for gallery.php page > title: Gallery

    give your suggestion please. 

  • Sonar Systems admin
    Likes 1

    You will need to use JavaScript for changing the title of the website based on the page.

     

    Put this code at the top of the page

    <script type='text/javascript'>document.title = 'Change this for the page title';</script>

     

     

    We are actually building an open source PHP framework which includes features like this using a simple method call. You can check it out at https://github.com/SonarSystems/Web-Framework 

  • Sonar Systems admin
    Likes 1

    Also if you have anymore questions please don’t hesitate to post them, no matter how simple or complex they maybe. There is no such thing as a stupid question.


Login to reply