I'm trying to build a portal site using IPE. There's a situation where we would like to override the panel title to make it shorter than the article it is linking to. "Link the node title to the node" by itself works great and presents the longer worded panel title when it is enabled. "Override Title" by itself works great, allowing me to use a custom panel title. The problem is, when I try to enable both of these options, "Override Title" takes precedence but the panel title is not linked to its node. Is there a way to get these two options to work together?

Comments

janyo’s picture

Yeah, getting the same problem. I assume that technically it is not the node title anymore that is displayed when an "override title" is in place, thus the "link node title to its node" doesn't apply anymore. At least that's what I'm reading out of it ;-)

I think it would be beneficial to change this feature into a generic "Link title to its node" which could work in either case, if it's possible to do that... Thanks!

jonathan1055’s picture

Yes I am having this problem too. I will also try to find which bit of code is causing it.
Jonathan

jonathan1055’s picture

Project:Chaos tool suite (ctools)» Panels
Version:6.x-1.8» 6.x-3.9
Component:Code» In-Place Editor (IPE)
Status:Needs review» Active
StatusFileSize
new128.33 KB
new763 bytes

Here is a patch to /modules/ctools/plugins/content_types/node/node.inc on the D6 version.

The trick was not to create the actual rendered active link here, but set title_link to the required url, so that the calling function ctools_content_render() can create the link there, which it can do already, but crucially it does it after the override title is used if required. This has the added benefit that keyword substitution in the title now works correctly on just the text, not the rendered link (which would sometime cause mal-formed html tags)

If it works ok, obviously I need to code the D7 version to be committed first. But given that the original post was for D6 I thought this would be a good place to start.

@jqt, @janyo: Please test and let me know how you get on.

Jonathan

jonathan1055’s picture

Status:Active» Needs review

Forgot to set the status to 'needs review'. Let me know if you want/need a D7 version. I've not looked at the D7 code at all, so I've no idea yet if the same change will do it.

jonathan1055’s picture

Project:Panels» Chaos tool suite (ctools)
Version:6.x-3.9» 6.x-1.8
Component:In-Place Editor (IPE)» Code

Guess it should really go into the ctools issue queue http://drupal.org/project/issues/ctools, given that this is where the code patch is required. The patch is against 1.8 but the dev version has not changed apart from the $id line being removed.
Jonathan

sco_tt’s picture

Project:Panels» Chaos tool suite (ctools)
Version:6.x-3.9» 6.x-1.8
Component:In-Place Editor (IPE)» Code
Status:Active» Needs review

Confirming that this works in Drupal 6 with Ctools 6.x-1.8 and Panels 6.x-3.9. Thanks!

jonathan1055’s picture

Version:6.x-1.8» 7.x-1.0-rc1
StatusFileSize
new763 bytes

Thanks sco_tt for testing it. I have now checked D7 and the same fault is there too. Luckily the fix is identical, and here is a patch against 7.x-1.x-dev of 7th January.
Jonathan

merlinofchaos’s picture

Status:Needs review» Fixed

Committed to D6 and D7!

Status:Fixed» Closed (fixed)

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