Results 1 to 6 of 6

Thread: Adding subtitle to a page title

  1. #1

    Default Adding subtitle to a page title

    Hello there,

    I´m trying extend the pagetitle of a page with a subtitle. The goal is to create a navigation in the frontend that contains the title and below the subtitle. In the backend it needs to have a textinput field to fill with the subtitle.

    I´ve created a table in the 'database.sql' in the 'config' folder. In the 'tl_page.php' file in the 'dca' folder I´ve created an array similar to the titel array.

    I can´t figure out which .php file I need to edit and which template. If anyone can give me a hint or help in anyway i would be great.

    Thanks!

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Adding subtitle to a page title

    That's not needed. You can simply use the PAGE name as the Link, eg. HOME and then type the subtitle in Page Title.

    Just because the template prefers the PageTitle instead of the Page Name, doesn't mean you have to use the default. The solution is quite simple, just create a new template copy of nav_default.tpl and then edit that for the main menu to use the Page Name for the A link and then add a sub-title using the pageTitle. If you're unsure of what the values are, you can do this with $this->showTemplateVars(); function in the nav_default.tpl template.

    I've done this method on the client website: http://www.remaxteamaa.co.za/
    [attachment=0:bopq1xsn]Screen shot 2010-08-05 at 15.19.53 .jpg[/attachment:bopq1xsn]

  3. #3

    Default Re: Adding subtitle to a page title

    Aha! Easy does it. Thanks for the help!

  4. #4

    Default Re: Adding subtitle to a page title

    Another question though ... How did you come across getting the full pagetitle in the browser top? I only get the subtitle in the browser top - obviosly because I use it as pagetitle. But that doesn´t cut the cake seen from a SEO perspective.

  5. #5
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Adding subtitle to a page title

    Here is the code:
    Code:
    <title><?php echo $this->mainTitle; ?>: {{env::page_name}} - {{env::page_title}}</title>

  6. #6

    Default Re: Adding subtitle to a page title

    Thanks!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •