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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | do-2498573-replace-in-rendered-entity.patch | 3 KB | heine |
Comments
Comment #1
gaëlgTheoretically, _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.
Comment #2
heine commentedDuring 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.
Comment #3
heine commentedComment #4
heine commentedComment #5
gaëlgThis should have been done along with http://drupalcode.org/project/views_navigation.git/commit/64a5521. Does it work?
Comment #6
heine commented> Does it work?
What information do you require?
Comment #7
gaëlgIt 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