Closed (won't fix)
Project:
Panels
Version:
5.x-2.0-rc1a
Component:
Plugins - content types
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
24 Jan 2008 at 16:08 UTC
Updated:
30 Aug 2010 at 13:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedThe title is removed because theme_panels_pane wants control over the title, but theme('node') also wants control over the title.
Interestingly, I *thought* I had put an option in to not remove the node title here, but apparently I hallucinated that. I had intended to do that. As such, this is a bug.
Comment #2
sunSo attached patch adds a setting to use the node title as page title.
However, while $node->title is finally available in node.tpl.php, the page title isn't set, nor altered due to the existence of $node->title.
Comment #3
sunAfter testing some more, we can simply remove that unset(). AFAICS, it doesn't affect Panels' output at all, and finally allows to use $node->title, resp. $title, in node.tpl.php.
Attached patch fixes this, and also cleans up code for $block->title_link.
Comment #4
sunI just accidentally nuked my working-copy of Panels, upgraded to current development snapshot, applied the last patch, and node titles started to working again.
Comment #5
niklp commentedIs this working now for node titles AND page titles...? so page_title module etc will still work as normal?
Comment #6
sunYes, Page Title module works with this patch, too. Just tested it.
Comment #7
merlinofchaos commentedI don't get it. Won't this end up causing the title to be output twice?
Comment #8
sunThe node title would be only output twice if a) there's no pane title override and b) you've configured the pane in a way that node.tpl.php will output the node's title (f.e. teaser view). However, that's up the user/theme developer who configures Panels. Without this patch, the node's title cannot be output in node.tpl.php at all.
Comment #9
sunStill required in beta5.
Comment #10
fairwind@drupal.ru commentedI'm apply this patch and page_title still not work (because i use v.2.0 of page_title?)
upd. sorry, my fault: just need to modify template.php :)))
Comment #11
sun@fairwind: This issue is about node titles, not page titles. You might have a look at the list of related links in #270699: Reverse page title override logic.
Comment #12
merlinofchaos commentedThis is NOT an uncommon situation.
This trades one bug for another, and that other bug will be reported ten times as often as this one. I need a solution better than that.
Comment #13
niklp commentedI'm fresh out of ideas, but I can tell you that not having the $node->title available in the template file nearly made me cry.
Comment #14
sunDue to Earl's complaints in #12, attached patch turns the node title into a pane configuration option.
However, although I've added this to checkbox description text, I never saw the node title twice or as page title.
Comment #15
merlinofchaos commentedThis should be made to match the version that is already set up with a checkbox in panels node legacy (which I'd totally forgotten existed until I was porting that to D6)
Comment #16
sunerm... panels_node_legacy looks quite different in a visual diff - so I don't really get your point here. Do you only mean the form item's description text? I would not agree with that, because the description (as well as the internal configuration key name of
leave_node_title) is negated, which makes it harder to understand (for users as well as developers).Forgot to initialize node_title in the $conf array, and moved that option below the title override setting.
Comment #17
dwightaspinwall commentedDid this issue ever get resolved?
I stumbled upon this thread while trying to figure out how to control the presentation of nodes displayed within Panels panes. Specifically, I've defined a simple content type called "blurb" which, apart from title and body, has one new boolean field which the user can check to either display or suppress display of the title. I see blurb playing a utility role throughout our site, allowing my marketing users to edit copy on a variety of "static" pages which have been formatted using Panels.
I was surprised to see that the node's title is not under the control of node.tpl.php. Is there a reason for this? Am I going about this wrong?
Comment #18
sun@Dwight: Without this patch, a node's title is only output in a panels pane content (= node.tpl.php) if you set the pane options to use Teaser view and to not use the page output. The node title will be displayed as pane title if you do not override the title setting.
If you want to display the node title in a page view (read: not Teaser view) and within the pane's content (read: not pane title), then you need to apply this patch and enable the new pane configuration option.
@merlinofchaos: Actually, above explanation might be the missing key for the whole issue...?
I really do not want to set my own patches to RTBC... this one is quite important.
Comment #19
sdboyer commentedI'll mark this critical so that I remember to get back to it later, sun, but at this point, I don't think I have a single minute I can take to review any other Panels issues before Szeged :(
Comment #20
summit commentedHi,
I think I have the same issue at hand.
I am trying hard to get the title of the node showing on a node-page, but it is not working.
I tried adding this in node.tpl.php:
But the $node->title will not show. It shows if I do not use node-override.
EDIT: I got this working with weblinks now. Nancy build a solution in weblinks.inc that worked getting the weblinks-tile to show!
Greetings,
Martijn
Comment #21
summit commentedHi,
Any progress on this point please?
I have the same situation now on hand with another module.
Thanks for going into this!
greetings,
Martijn
Comment #22
sun@Summit: If you want to see progress, then apply and TEST the patch, and report back if it works. Exactly for this purpose, this issue is marked as 'needs review'. Just complaining doesn't help anyone.
Comment #23
summit commentedHi, Sun, didn't intent to complain. I will test the patch. Greetings, Martijn
Comment #24
summit commentedHi Sun,
I tested the patch in #16 (http://drupal.org/node/213751#comment-937452). It is working for the node-title!
The only thing is that now the node-body is not shown in the node-pane.
Because I also let node.tpl.php show the node-title it is shown twice now on top of the panels-pane.
With patch, no node-body but the title tag is working from #20.
Without patch, node-body but no title tag in #20.
Hopefully to get the node-body showing is not so difficult .
EDIT: I think the node-body is part of the $content in the node.tpl.php. I think the $content is not shown using the patch.
Again, sorry If I sounded complaining, was absolutely not intented.
Thanks for going into this again.
Greetings, Martijn
Comment #25
sdboyer commentedAssigning this to myself so I don't miss it next time I'm cleaning the queue.
Comment #26
summit commentedHi Sam,
Thanks. Looking forward to a solution of the body/$content shown including this patch!
Could this problem also be the problem of my post: http://drupal.org/node/210908#comment-729857. Userreview not shown on node-pages controlled by panels 2?
greetings,
Martijn
Comment #27
Leeteq commentedSubscribing.
Comment #28
summit commentedHi,
Any progress to this issue please Sam?
Thanks a lot in advance for looking at it again!
Greetings,
Martijn
www.trekking-world.com
Comment #29
laken commentedI was going crazy over why $title and $node->title weren't available in my node template, until I remembered I was using a panel and searching brought me here.
I applied the patch in #16 and it works perfectly for my purposes. Thanks sun!
Comment #30
laken commented(dup comment)
Comment #31
summit commented@Alaken, Also the node-body?
greetings,
Martijn
Comment #32
summit commentedHi, Set this to Drupal 6. Could it be that this patch (somehow altered as a D6 patch), is still needed to get the $node->title in? Sorry if altering from D5 to D6 was not the right thing to do.
I am having an issue with cck-link now, which seems somewhat the same as with weblinks, see: http://drupal.org/node/897330
Thanks for going into this again for panels 6!
greetings, Martijn
Comment #33
sunPlease don't do that. Panels for D5 and D6 are very different modules. This issue is dead.