Sometimes a theme might require the title to appear below other elements and this is currently not possibile whitout hacking the template files since a double lable is displayed otherwise. Having the ability to select whether to show the page title or the entity label per instance would help dealing with this use case.

CommentFileSizeAuthor
#2 title-1433060-2.patch6.93 KBplach
#1 title-1433060-1.patch6.93 KBplach

Comments

plach’s picture

Status: Active » Needs review
StatusFileSize
new6.93 KB

The attached patch adds a couple of checkboxes in the instance settings of the fields replacing entity labels. which allow to hide the page title and/or the entity label from their respective templates. Moreover newly created replacing field instances are now hidden by default.

plach’s picture

StatusFileSize
new6.93 KB
+++ b/title.core.inc
@@ -26,6 +26,11 @@ function title_entity_info() {
+    'display' => array(
+      'default' => array(
+        'type' => 'hidden',
+      ),
+    ),

This should not be a core-only behavior.

peximo’s picture

Status: Needs review » Reviewed & tested by the community

I have tested the patch and it seems to work.

plach’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/title.module
@@ -610,3 +611,134 @@ function title_tokens_alter(array &$replacements, array $context) {
+ *   (Optional) The current render phase: page or entity. Defaults to entity.

This should start with (optional).

plach’s picture

Status: Needs work » Reviewed & tested by the community

I'll fix it on commit.

plach’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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

  • Commit 9797c95 on 7.x-1.x, workbench by plach:
    Issue #1433060 by plach: Added Allow to use entity label fields in the...