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
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?
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?
0
Comments
Vanilla staff, please give us flexibility for changing titles like WP
There was an error rendering this rich post.
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 ^__^
The correct file to look for that is:
/library/core/class.controller.php