I've created a page that needs to run node_load to pull information onto a page. For a category, I've defined a node reference field to have a featured article on a category page. And perform a node_load a view's argument field to to get the referenced node's information.

So the category page node/5 references node/10.
node/5 has a page title: "I'm a category page"
node/10 has a page titel: "I'm a node reference"

When node/5 is loaded, the titlebar will have a title of "I'm a node reference" but should have "I'm a category page"
Is there a way to tell page title to NOT run?

Comments

keylope’s picture

I think I've solved my own problem, perhaps if it's worthwhile you could add it.

I added another condition for the view. I found that when the other nodes were being viewed, they were teasers and pages and so, were going through the page title module. I don't know if my implementation was incorrect, but because the main page was just a page and not a teaser, I added the following to make sure that it only displayed the current page's page title.

case 'view':
if ($page && $teaser == NULL) {
page_title_set_title($node->page_title);
}
break;

nicholasthompson’s picture

Assigned: Unassigned » nicholasthompson

I shall add this fix to 1.1 and 2.0alpha - thanks for spotting it!

keylope’s picture

No problem. Glad to have helped!

nicholasthompson’s picture

Version: 5.x-1.1 » 5.x-2.x-dev
Status: Active » Fixed

Fixed in Page Title 2 Dev. This will appear in Page Title 2 Alpha 4.

http://drupal.org/cvs?commit=96284

I decided to do...

if ($page && !$teaser) {

... rather than checking if teaser is NULL.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.