The title should be hidden if on a node page since the title becomes the page title.


ptrl’s picture

Version:7.x-3.0-beta2» 7.x-3.0-beta3
ptrl’s picture

Title:Hide node title on node page» Hide node title on node page and check display setting on submitted info
new1.12 KB

Also noticed that the submitted by isn't checked to see if it's should be displayed of not.

q0rban’s picture

Status:Needs review» Needs work

Yep, patch works well, although I see the problem in object.tpl.php as well.

ss81’s picture

Hi 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.

barraponto’s picture

Title:Hide node title on node page and check display setting on submitted info» Hide title in node and object pages

There 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.

barraponto’s picture

Title:Hide title in node and object pages» Hide title in node pages
new624 bytes

My 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.

CoffeyMachine’s picture

Status:Needs work» Fixed

I tested and committed 932744-tao-hide-title-if-page-6.patch to the 7.x-3.x branch.
Looks good to me, thanks all!

CoffeyMachine’s picture

Status:Fixed» Closed (fixed)