To add a new Extra field option to allow users to integrate with options such as Display Suite (#1946902: Integrate with Display Suite) and Panels (#2544492: Using Panelizer and Panopoly - link disappears if moved.).

So adding a new placement option:

And if set, insert a new field option via hook_field_extra_fields() and insert the Read more there.

Drupal WTFs / Issues:

  • Will show on all display modes settings listings (i.e. /admin/structure/types/manage/page/display)
  • Positioning and visibility via core field settings, access via the module settings
  • Caching issues????
  • None I can think of :)

May help with

#2481033: Doesn't seem to work with Printer Friendly Pages - albeit there could already be a workaround
#1566652: Is there a way to make the Read More settings work in Views? - views should expose the additional extra fields (unlikely to help)

Last feature before starting a D8 port.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Alan D.’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
5.54 KB

Right, any positive feedback / testing should see this committed.

Tested on terms and nodes without issue.

Important
You must set the Field option (labeled Append as an extra field) globally per entity type without overriding the bundle default settings OR set the default settings to use the extra field.

i.e. for nodes.

Global configuration

/admin/config/content/read-more-control

Page content type configuration

/admin/structure/types/manage/page/display

Note the core bug in that we can not control the default visibility, so once enabled, disable on the default display, then on the other enabled displays were you do not want to show this.

Alan D.’s picture

PHP notice was being thrown. Quick fix attached.

Anyone tested this?

Alan D.’s picture

Sorry, this one:

amaisano’s picture

Hi - trying to test this, but having trouble setting up. Starting from scratch, how, where, and which settings should be checked?

After applying the patch, I'm not getting any read more links anywhere, even when all settings on all pages (global and manage display) are set to 'Always show...'

Thanks.

Alan D.’s picture

hehe, a bit hidden

Globally (so be warned, Drupal just shows these)

/admin/config/content/read-more-control

Under Global formatting settings fieldset, check "Custom settings" and it is final option on the Link placement option "Append as an extra field"

Or per content type (recommended)

/admin/structure/types/manage/page/display

As above.

And once enabled on a content type, by either of the above options, you can control the behaviour in individual display modes (i.e. teaser)

amaisano’s picture

Ok, thanks for the clarification. I can confirm this allows me to use the field independently in Panels. However it's unfortunate that in Panels I still can't use this module to put the read more link inline (which is what I was going for in #2544492: Using Panelizer and Panopoly - link disappears if moved.). For that issue I've settled for using custom text with tokens for [summary] + "..." + [read_more_link] with inline elements.

trumanru’s picture

Status: Needs review » Needs work

#3 doesn't work for me.
I use DS. I tried to apply the patch. After I switched it on and enabled an option "Append as an extra field" on an individual content type's configuration for the view mode "Teaser" a new field/placeholder appeared in ncontent type view mode "Teaser" in the table with fields.
But this field shows always when I open any node in "Teaser" view mode.
After I disabled, removed and reenabled the module extra option "Append as an extra field" disappeared from per content type module's configurations.

Marco Aurelio Rocca’s picture

The patch worked for me! Thanks!
Using the 7.x-1.x-dev version along with Display Suite module and Display Suite Bootstrap Layouts module.