Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Page titles

edited January 2011 in Vanilla 2.0 - 2.8
I'm trying to see what, if any options I have for displaying page titles. At this time here is how they are being displayed:

Forum Home: All Categories - Example.com Forum
Category: Category Name
Post: Post Name - Category Name

Here is how I'd like it to read:

Forum Home: Example.com Forum
Category: Example.com Forum | Category Name
Post: Example.com Forum | Category Name | Post Name

Is this possible?

Comments

  • edited January 2011
    The current order (example.com at the end) is better for your search engine ranking. Someone correct me if I'm wrong.
  • The current order (example.com at the end) is better for your search engine ranking. Someone correct me if I'm wrong.
    i'd like to know if this is indeed true.

  • aeryaery Gtricks Forum in 2.2 :) ✭✭✭
    Even I would like to do same.

    Vanilla staff, please give us flexibility for changing titles like WP

    There was an error rendering this rich post.

  • edited February 2017

    I used the current method in respuestas.kimovil.com:

    <?php if (!defined('APPLICATION')) {exit();} class KimovilThemeThemeHooks implements Gdn_IPlugin { public function Setup() {} public function Base_Render_Before($Sender) { // Page Head sender if (is_object($Sender->Head)) { // If we are in a discussion page (change controller for different pages) if ( is_a($Sender,'DiscussionController')) { // Add category name to the title $Sender->title( ConcatSep(' - ', valr('Data.Title', $Sender, ''), valr('Data.Category.Name', $Sender, '')) ); // Add discussion title and body (max 155 char) to meta description $Sender->description( substr(rtrim(valr('Data.Discussion.Name', $Sender, ''), '.').'. '.valr('Data.Discussion.Body', $Sender, ''), 0, 155) ); } } } }

    You can get an idea of ​​what you can change in:
    /applications/dashboard/modules/class.headmodule.php

    Hope this help ^__^

  • You can get an idea of ​​what you can change in:
    /applications/dashboard/modules/class.headmodule.php

    The correct file to look for that is:
    /library/core/class.controller.php

Sign In or Register to comment.