Comments

dave reid’s picture

I'm fine with them staying separate since it's a bridge between two modules rather than simply adding title support in nodewords.

dave reid’s picture

Assigned: Unassigned » dave reid

Well, I reconsider. Taking a look at the page title module and it duplicates a lot of the context handling that we already do in nodewords. The only thing is we have to do a little bit of special casing since the page title has its own variable in template_preprocess_page separate from $variables['head'].

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new3.8 KB
dave reid’s picture

So yeah, this completely obsoletes the page_title and nodewords_pagetitle module when nodewords is in use. And was ridiculously easy to implement.

dave reid’s picture

We should probably target 6.x-1.13 for this so we can get a chance to discuss with the nodewords_pagetitle maintainers.

Brian294’s picture

Thanks for keeping me in the loop Dave on this recent development. You're right, implementing page titles into nodewords natively is ridiculously easy, that's why I wrote nodewords_pagetitle with just a few lines of code!

I'll get back with you soon once I have a chance to review the patch.

Peace,
Brian

robbertnl’s picture

Great patch. I can confirm this patch works. I am looking forward this patch is included in the new release

Liam Mitchell’s picture

Applied patch and working fine so far. Will update if I encounter problems.
Thanks

pfx’s picture

I tested the patch and it worked well for me. Thanks for the patch.

damienmckenna’s picture

Issue tags: +v6.x-1.12 blocker

Will review.

hanoii’s picture

Question: Are you saying with this we can just not use page_title and achieve the same results on any page? or is it the nodewords_pagetitle bridge that's not necessary?

hanoii’s picture

+++ nodewords_basic/includes/nodewords_basic.nodewords.tags.inc	8 Nov 2010 02:05:43 -0000
@@ -9,6 +9,32 @@
+    '#description' => t('Provide a description for this forum overview page to appear in the @title tag which search engines can use in search result listings (optional). It is generally accepted this field should be less than 70 characters.', array('@title' => '<title>')) . $options['description'],

>> Provide a description for this "forum overview page"??
Was that description on purpose?

>> "It is generally accepted this field should be less than 70 characters."
I recently found this: http://www.hugoguzman.com/2010/05/dont-believe-the-hype-google-does-full...

Just thought of pointing this out.

Other than that, tested the patch and it's working great, and I think I can answer #11, which is that page_title is not really needed any more, Am I right?

Powered by Dreditor.

robbertnl’s picture

I am only missing the sitename in the title. So i changed the patch a little bit in nodewords.module:
From:

    // Title tag has its own page preprocess variable.
    if (!empty($output_tags['title'])) {
      drupal_set_title($output_tags['title']);
      $variables['head_title'] = strip_tags(drupal_get_title());
      unset($output_tags['title']);
    }

To:

    // Title tag has its own page preprocess variable.
    if (!empty($output_tags['title'])) {
    	$pagetitle=$output_tags['title'].' | '.variable_get('site_name','mysite.com');
      drupal_set_title($pagetitle);
      $variables['head_title'] = strip_tags(drupal_get_title());
      unset($output_tags['title']);
    }

Maybe this is not the best place and there should be an option to select if you want the sitename included in the the title

hanoii’s picture

@robbertnl: No need for an option, you can use tokens on the title metatag as with any other tag. So, you could have:

[title] | [site-name], that works, I am using it.

I don't remember the site-name token exactly so it may be slightly different.

robbertnl’s picture

I guess that should work but then i have to edit all pages and add the [site-name] token

hanoii’s picture

Isn't there a default setting where you can put the token?

robbertnl’s picture

Yes there is but i have titles that are slightly different compared to the page title. SO i cant use the 'title' token

mrfelton’s picture

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

mrfelton’s picture

Also, how about providing a migration path from the page_title module?

nevets’s picture

Looking at #13 I would not expect this module to call drupal_set_title($pagetitle), since I believe that also changes the viewable title.

dave reid’s picture

Issue tags: -v6.x-1.12 blocker

Bumping to 6.x-1.13. We really, really need to get a 6.x-1.12 release out before adding any more new features.

damienmckenna’s picture

De-tagging, will review priorities after the next stable release.

damienmckenna’s picture

Status: Needs review » Needs work

This needs to be rerolled for the current codebase.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new6.37 KB

A new patch with several improvements - there's now an option to automatically append the site name (with an optional divider), and I updated the docs accordingly.

damienmckenna’s picture

StatusFileSize
new6.63 KB

Forgot to bump the API version listed in the main module.

damienmckenna’s picture

Assigned: dave reid » damienmckenna

BTW when this is committed the Nodewords_PageTitle module should be marked as obsolete (which would also solve #1301972: Deprecate Nodewords_PageTitle).

damienmckenna’s picture

Status: Needs review » Fixed

Committed!

damienmckenna’s picture

StatusFileSize
new518 bytes

A follow-up patch for a permission reference that was missing from the tag definition.

damienmckenna’s picture

Status: Fixed » Needs review

Another follow-on, renaming the 'title' value as 'page_title', to avoid any possible conflict with any other possible meta tags.

damienmckenna’s picture

StatusFileSize
new4.74 KB

This time *with* the patch. #facepalm.

damienmckenna’s picture

Status: Needs review » Fixed

I've committed the last patch, the 'title' field has now been renamed to the 'page_title' field and the field labels updated accordingly.

damienmckenna’s picture

StatusFileSize
new401 bytes

One final follow-on patch from the last, the API version of nodewords_basic needed to be bumped to accommodate the new page title meta tag.

hanoii’s picture

Status: Fixed » Needs review
StatusFileSize
new616 bytes

small note: nodewords-n948342-32.patch is the same as nodewords-n948342-29.patch

Anyway, I think I found another follow-on patch, the preprocess variable should be head_title instead of page_title as per the default garland theme and probably most themes.

hanoii’s picture

Category: feature » bug

I guess it's now a bug as this is already a feature.

hanoii’s picture

StatusFileSize
new523 bytes

Sorry, fixed patch.

damienmckenna’s picture

Status: Needs review » Fixed

Thanks for catching that, I've committed it.

Status: Fixed » Closed (fixed)

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

summit’s picture

Status: Closed (fixed) » Active

Hi,
Set this to active again, because I think a small think was missing from this port.
I used nodewords_pagetitle with tokens support for page title, description, keywords in custom pages.

This somehow is not working anymore with 1.x and 2.x Nodewords including this nodewords_pagetitle port.

Greetings,
Martijn

summit’s picture

Status: Active » Closed (fixed)

Hi seeing this issue for token support http://drupal.org/node/1380362
So setting this to closed fixed then, right?

Looking forward to token support on 6.1.x!
greetings, Martijn

damienmckenna’s picture

Assigned: damienmckenna » Unassigned
Issue summary: View changes