Closed (fixed)
Project:
Views navigation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2014 at 14:20 UTC
Updated:
1 Nov 2017 at 12:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gaëlgThis is not always true. It's a tricky problem but I made something that should work in this commit: https://www.drupal.org/commitlog/commit/51720/607394a95de57332a60fd2faf0...
It might need improvement to work in some special cases though. Please provide info about how to reproduce this on simplytest.me.
Comment #2
gaëlgNo answer for 2+ months. Closing.
Comment #3
heine commentedDisplay suite is a render plugin distinct from "Rendered entity". Attached patch adds an override handler.
Depends on the patch from #2498573-2: Fix incorrect links by moving replacement to #postrender
Comment #4
heine commentedComment #5
gaëlgThe code changed in the meanwhile. The attached patch seems to work for me. Can you please confirm?
Comment #6
BarisW commentedPatch works fine, thanks.
The only thing I found is that the preg matching fails when using a language prefix in the path (eg /en/name-of-my-node).
And one minor performance improvement:
Minor fix: the module_load_include can be placed above the foreach
Comment #7
BarisW commentedHere's a patch that fixes my comments in #6.
It also adds the replace_html logic for the entity_views_plugin_row_entity_view class and implements a new one for the entity_views_handler_field_entity.
Comment #8
BarisW commentedSame patch with a small improvement, that takes the domain into account. This is useful for sites that use the subdomain module icm with views navigation.
Comment #9
gaëlgComment #10
workplaysleep commentedThis patch worked for me, but I had to remove the language prefix. My project is in a single language (dutch), the node paths have no language i them (normal for single language), but the pattern made in '_views_navigation_replace_href_in_html' contains '/nl' zo I had to comment out these 3 lines to make it work.
I (mis)use _views_navigation_replace_href_in_html in hook_views_pre_render to add a extra link field to the views row. I use this field to wrap each views row in a href. Probably not the cleanest solution, but I wanted to reduce the markup made by views and the rows template seemed the best location to wrap a link around the teaser, any thought on a better solution are welcome ;)
Comment #11
workplaysleep commentedI ended up directly calling '_views_navigation_build_url' form 'hook_views_pre_render' to create the link, so need for the patch, but my previuous comet might be useful for others.
Comment #13
BarisW commentedI committed this to dev. Couldn't reproduce the comment in #10. If this is still an issue, please open a new issue.