Hi,

I have a node (A), which references another node (B).

In the teaser view mode of the node (A), I need to change the label (link) to the referenced entity/node (B) (to replace the title of this entity by a generic expression of the type "see the referenced node").

Do you have a solution?

Thanks in advance

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Paulset created an issue. See original summary.

Paulset’s picture

Issue summary: View changes
mercepedraza’s picture

Title: Change the label of the referenced node in teaser view mode » Change the label of the referenced node in the label formatter
Version: 7.x-1.1 » 7.x-1.x-dev
Category: Support request » Feature request
Status: Active » Needs review
Related issues: +#1896328: Add "Link to Edit Page" option to the label display formatter
FileSize
1.83 KB

In this patch I try to solve this problem by adding an option to override the label. The approach is very similar to the used in the related issue. I also made a little code simplification in the link setting code.

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 3 year old patch in #3 to entityreference.module does not apply to the latest 7.x-1.x-dev and if still relevant needs a reroll.

Checking patch entityreference.module...
error: while searching for:
      'field types' => array('entityreference'),
      'settings' => array(
        'link' => FALSE,
      ),
    ),
    'entityreference_entity_id' => array(

error: patch failed: entityreference.module:1082
error: entityreference.module: patch does not apply
rpayanm’s picture

rpayanm’s picture

Issue tags: -Needs reroll