Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The title should be hidden if on a node page since the title becomes the page title.
Comment | File | Size | Author |
---|---|---|---|
#6 | 932744-tao-hide-title-if-page-6.patch | 624 bytes | barraponto |
#4 | tao-932744-submitted_check_and_hide_title_if_page.patch | 1.13 KB | ss81 |
#2 | tao-932744-title_and_submitted_check.patch | 1.12 KB | ptrl |
tao-node_page_title.patch | 848 bytes | ptrl |
Comments
Comment #1
ptrl CreditAttribution: ptrl commentedComment #2
ptrl CreditAttribution: ptrl commentedAlso noticed that the submitted by isn't checked to see if it's should be displayed of not.
Comment #3
q0rban CreditAttribution: q0rban commentedYep, patch works well, although I see the problem in object.tpl.php as well.
Comment #4
ss81 CreditAttribution: ss81 commentedHi All,
I fixed the logic in tao_preprocess_node(). I think it's better to realize logic in template.php and presentation -- in templates.
New patch is attached.
Comment #5
barraponto CreditAttribution: barraponto commentedThere are actually two issues here:
* Node and Object templates are printing the title even if it is a page display. Core checks for this in node.tpl.php, taxonomy-term.tpl.php, user-profile.tpl.php. If we are going to check whether $title is set in the tpl.php files, let's just check whether $page is set there, and kepp consistency with core
* Submitted info is being printed regardless of settings in content type UI. This is critical, since it breaks functionality. I have split the issues and there is a separate issue for this bug at #1260954: Submitted information is always printed, and I have set it to Critical and RTBC. I have rerolled ss81 patch and attached it there.
Comment #6
barraponto CreditAttribution: barraponto commentedMy bad, the Object templates aren't used for user and terms. Only node needs fixing. Here's a patch with the checks ss81 proposed, but checking for $page before checking for $title, since $title will almost always be set and $page evaluates faster.
Comment #7
CoffeyMachine CreditAttribution: CoffeyMachine commentedI tested and committed 932744-tao-hide-title-if-page-6.patch to the 7.x-3.x branch.
Looks good to me, thanks all!
Comment #8
CoffeyMachine CreditAttribution: CoffeyMachine commented