Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 04:03:39 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155542 Posts in 21714 Topics by 7771 Members
Latest Member: apanvaraliree
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: News v3.5 - Show title in page title  (Read 688 times)
flip

Offline Offline

Posts: 83


« on: March 24, 2011, 11:04:19 AM »

Hello,

I'm using the News v3.5 module. The page title is always the same for all posts which is not ideal for SEO.

How can I show the title in the page title and the short intro in the meta description?

Thanks,

Philip
Logged
Ruud
WebsiteBaker Org e.V.

Online Online

Posts: 2297



WWW
« Reply #1 on: March 24, 2011, 11:10:06 AM »

Have a look here..
It is your solution.
Logged

Professional WebsiteBaker Solutions
flip

Offline Offline

Posts: 83


« Reply #2 on: March 24, 2011, 01:10:41 PM »

Hi Ruud,

It partly solves my issue. I'm using a customized page title in the template file:
<?php page_title(' // ', '[PAGE_TITLE][SPACER][WEBSITE_TITLE]'); ?>

I think that I can't use that any more but would need to change the include.php of Simple PageHead - I'm not a developer though.

Philip
Logged
Ruud
WebsiteBaker Org e.V.

Online Online

Posts: 2297



WWW
« Reply #3 on: March 24, 2011, 01:21:07 PM »

In the include.php - change line 117
Code:
if (strlen($the_title) < 15) {$the_title = WEBSITE_TITLE. " - " .$the_title; }
into
Code: (untested)
$the_title .= " - ".WEBSITE_TITLE
(exactly like this!)

That should do it.
Logged

Professional WebsiteBaker Solutions
flip

Offline Offline

Posts: 83


« Reply #4 on: March 24, 2011, 02:08:59 PM »

When I replace the full line, then all page are blank. Probably it should be as follows:

Quote
if (strlen($the_title) < 15) {$the_title = $the_title. " // " .WEBSITE_TITLE; }

When I do so, then only the page title is shown. The website title and spacer don't show up. Also in the original version the spacer and website title aren't displayed.
Logged
Ruud
WebsiteBaker Org e.V.

Online Online

Posts: 2297



WWW
« Reply #5 on: March 24, 2011, 02:16:08 PM »

my mistake:
Code:
$the_title .= " - ".WEBSITE_TITLE;
forgot the last charachter " ; ". That will generate an error causing the blank page.

Your solution starts with a test, it will only work on page-titles of less than 15 characters.
So on longer page titles you will not see the spacer and the website name.
Logged

Professional WebsiteBaker Solutions
flip

Offline Offline

Posts: 83


« Reply #6 on: March 24, 2011, 02:49:23 PM »

Many thanks! That works excellent ...
Logged
MarkPrima

Offline Offline

Posts: 20


« Reply #7 on: April 04, 2011, 05:33:49 PM »

I thought I would ask my question here rather than a new thread.

I am doing some mods on the News page and was wondering how to modify the News module.

This is my page http://cms.ssmarts.org/pages/news.php

I want to separate the news items with a <hr> tag but can't seem to find the right location - and in what file? I have experimented with a few files - I would say it is in the veiw.php file?

Thanks
Logged

sky writer

Offline Offline

Posts: 285



« Reply #8 on: April 04, 2011, 06:07:55 PM »

If I am understanding your need properly, you can add the <hr> in the admin News "Settings" tab.  Just click your News Page, then the "Settings" button.  Then make the change in the "Post Loop:" window.

Something like:
...
<td class="post_short">
[SHORT]
<hr>
</td>
</tr>
...

Hope this helps.

I thought I would ask my question here rather than a new thread.

I am doing some mods on the News page and was wondering how to modify the News module.

This is my page http://cms.ssmarts.org/pages/news.php

I want to separate the news items with a <hr> tag but can't seem to find the right location - and in what file? I have experimented with a few files - I would say it is in the veiw.php file?

Thanks
Logged
MarkPrima

Offline Offline

Posts: 20


« Reply #9 on: April 04, 2011, 06:20:36 PM »

Precisely!!
Thanks - that was easier than I thought.
Cheers!
Logged

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!