I've got a site running Organic Groups, so would like to incorporate the [ogname] token into the page TITLE. This works fine if the page has an OG context. However, if there is no OG associated with a node, then the actual text [ogname] is inserted into the page TITLE. I've noticed that other modules (such as Pathauto) will simply ignore a blank token (ie, not generate any output), but not the case with Page Title.

Not knowing the protocol for Tokens, should this be something that the Page Title module should address? I couldn't find any relevant issues on blank tokens in the issue queue, but believe this is a wider issue that must be relevant to use of this module with other modules.

Thanks and apologies if this was discussed in the past: blame Google/Solr....

Comments

nicholasThompson’s picture

Status: Active » Needs work

It sounds like a PT issue... Basically, with Tokens, Page Title has to determine the context of the page and pass any relevant token data sources over to token... eg a Node or User object.

I'll have to take a look into this.

snorkers’s picture

I've just tried the module out on another environment and have had completely random results... however, I suspect that this may be to do with the use of Blueprint #661422: Incompatible with Page Title. My fault for not noticing this rather prominent disclaimer on the project home page.
I'll try out with another theme and see what I discover.

snorkers’s picture

Title: Empty [ogname] token handling » Organic Groups token handling

OK upgraded Blueprint to 6.x-2.0-dev and also tried sites in Garland; same inconsistent results...

Page Title picking up most tokens just fine, but inconsistencies lie in [ogname]. Now I'm finding that the token is not being applied at all for new nodes; but it is applying the [ogname] token for previously created nodes. I'm also no longer seeing the [ogname] text appearing in the TITLE if a node doesn't have an OG context.

For info, Pathauto is also building a new node's URL using [ogalias], so Token is clearly picking up the node's OG context, but it's just not being applied to Page Title for new content.

So it no longer seems as though the originally posted issue is correctly titled... in fact I'm not entirely sure what the problem is now, although it does seem as though OG context is not being detected.

Hmmm...? Not sure where to take this now...