Closed (fixed)
Project:
Token
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2015 at 10:33 UTC
Updated:
12 Jan 2016 at 16:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hussainwebHere is an initial patch. I am looking at ways to make the template file more usable. Currently, there is only one variable which just gets rendered. Any suggestions to improve?
Comment #4
hussainwebI forgot to attach the template itself. I also added more variables and improved the twig file so that the link is constructed there, not in the preprocess function. This should allow for more flexibility if necessary.
Comment #5
berdirWas wondering how this would end up looking exactly. I guess this is why I was wondering if we shouldn't use a #type. We could have a #type that extends from Link or so. But that would be another API change for everyone using it ;)
AFAIK link is a renderable that can be printed in the template with just {{ link }} ? I guess we can also do that. Still gives anyone an change to change this, but I actually think that almost nobody does that anyway..
Comment #6
hussainwebYes, I started with link and then decided to break it up in case it is required. As an afterthought, I left the link variable in there.
I am not sure what you mean by "looking exactly". I checked the output HTML and for all purposes, it looks exactly like before.
Comment #7
berdirby "looking exactly" I meant how the template looks.
I'd prefer to go with just link in the template. no need to make it more complicated than it has to bre.
Comment #8
hussainwebChanging the twig file. Personally, I don't mind and yes, I don't see this being overridden, but you never know. :)
Comment #9
berdirOk, this looks like a good improvement and step forward. Committed.