I have view which displays rendered entities (i use display suite, not sure if it matters), when I apply the redered entity type the link on the title and a custom read more field/trigger get rewritten. I'f i'm correct this is done by _alter_markups_recursive
But the images which link to the content stay the same, they don't get touched by '_alter_markups_recursive' at all, probably some other hook rewrites them later, any thoughts on how to approach this?

Currently I replace the links frontend with javascript, which is a very poor solution.

Comments

gaëlg’s picture

Status: Active » Postponed (maintainer needs more info)

Theoretically, _alter_markups_recursive() should do it. But the function might not work in your case. You should have a look at what happens in it to understand why it doesn't work for you, I could not cover any possible use case.

heine’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new3 KB

During views_navigation_plugin_entity_row_entity_view::render fields may still be non-markup render arrays. This happens for example when the node entity view mode renders a field collection field in a field collection entity view mode.

Attached patch adds post_render callbacks on the node elements in the rendered_content render array. This allows the module to replace urls in the fully rendered HTML of all the node's children.

heine’s picture

Title: rendered entity: image with link » Fix incorrect links by moving replacement to #postrender
heine’s picture

Category: Feature request » Bug report
gaëlg’s picture

Status: Needs review » Postponed (maintainer needs more info)

This should have been done along with http://drupalcode.org/project/views_navigation.git/commit/64a5521. Does it work?

heine’s picture

> Does it work?

What information do you require?

gaëlg’s picture

Status: Postponed (maintainer needs more info) » Needs review

It would be nice if you could test the latest dev to see if it fixes the bug you encounter in your context: "when the node entity view mode renders a field collection field in a field collection entity view mode". And if it doesn't, do you understand why?

Actually it's more a "needs review" than a "needs more info".
NB: for the display suite support, it's in the separate issue: #2316483: Add support for view rendered with display suite