It might be good to have the option to migrate custom_page titles from the page title module. I wonder if you would consider such a feature, maybe done as a special option. I might be willing to submit a patch for this.

Comments

DamienMcKenna’s picture

I'm definitely interested in this, though should Nodewords be so bold as to assume you want to migrate and do it automatically or just leave it as an option? Hrm.

mr.j’s picture

A comment that was ignored in the page title thread:
http://drupal.org/node/948342#comment-4249236

This doesn't completely replace the page_titles module does it? You can't set the default page titles on a per content type basis as you could with the page_title mosule

I am concerned that if I update to the latest nodewords release (currently we're on 6.x-1.13) that, apart from there being no upgrade path, page_title defaults will be overridden by nodewords and we'll lose page_title tags on pages that use the content type defaults that nodewords does not support. Can anybody confirm or deny that?

hanoii’s picture

This is not itself an upgrade, but wanted to share some php snippet I just used for updating at least the custom pages page title that were added by Nodewords Page Title (Views, Panels, Non-nodes).

I am using a dev version ahead of 1.13 in which page_title were added so this should work on new dev. It's a step forward an upgrade path. I run this through the devel php code block.

$result = db_query("SELECT * FROM {nodewords} WHERE type = 10 AND name='page.title'");
$count = 0;
while ($row = db_fetch_object($result)) {
  if (preg_match('/a:1:{s:5:"value";s:([0-9]+):"(.*)";}/U', $row->content, $matches)) {
    $new_content = 'a:3:{s:5:"value";s:' . $matches[1] . ':"' . $matches[2] . '";s:6:"append";i:1;s:7:"divider";s:3:" | ";}'; 
    db_query("UPDATE {nodewords} SET name = 'page_title', content = '%s' WHERE type = 10 AND name='page.title' AND mtid = %d", $new_content, $row->mtid);
    $count++;
  } 
}
return t('@count processed', array('@count' => format_plural($count, t('1 row'), t('@count rows', array('@count' => $count)))));
squarecandy’s picture

@hanoii - thank you, thank you, thank you!!!

mr.j’s picture

In answer to my own question in #2, if you have both page_title and nodewords modules installed, nodewords will override page_title if you have a page title set in nodewords, but won't if you don't. So you can still use page_title for default titles for each content type, and override them on a node by node basis if you like.

You end up with two page title fields on the node edit form though. If you fill them both out the one from the nodewords section wins.

DamienMcKenna’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Thank you for taking the time to work on this. However, the module is no longer supported, so I'm closing this issue.