Closed (fixed)
Project:
Leaflet
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Sep 2016 at 20:00 UTC
Updated:
15 Oct 2018 at 14:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ooystein commentedHere is a patch that enables twig on the icon fields and adds the fields as twig variables.
We should consider adding context variables to the twig variables if this is requested by anyone.
PS. This does not work when twig debugging is enabled as it includes html comments to the variables
Comment #3
netsliverNew patch for the latest dev version
Comment #4
joumWorks like a charm! Good job!
I'm using core 8.5.6 under PHP 7.2.7.
If this ends up entering the Leaflet module's core, some info on how to style the marker in depth would be nice, too.
Would it be hard to also add a className to the marker?
Comment #5
itamair commentedtnx @netsliver ... going to review this asap, also with @joum requests ... and eventually amend or commit to dev
Comment #6
afschIn Drupal 8.5.6 under PHP 7.1, I got an error trying to load the Manage Display (default display). Here I added the same patch in #3 with an extra condition. This issue is related to Field Formatter.
Anyway this solution works amazing, Thanks.
Comment #7
afschComment #8
shortspoken commentedWorks as expected. Thanks everyone! :)
Comment #9
itamair commentedThanks dudes for this contribution.
I reviewed more carefully, and some important amends were needed, in the last #7 patch both on coding standards and correct OOP implementations, and also because you didn't considered that all the changes applied into the LeafletSettingsElementsTrait would have affected (and messed up) the LeafletDefaultFormatter ... in which the Views Fields Tokens implementation wouldn't have applied/worked.
Here it is a final patch that works and that is going to be committed into dev and last new module release.
Comment #11
itamair commentedComment #12
itamair commentedIt would be nice to extend this functionality into the LeafletDefaultFormatter too ...