Closed (won't fix)
Project:
Linkit
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Nov 2010 at 10:42 UTC
Updated:
11 Sep 2012 at 14:09 UTC
Great module!
But I can't style (CSS) the links depending on the content type of the linked node.
This would be possible by simply adding the following class to the
tag.
"content-type-[NAME]"
The reason I want this is to be able to add different image icons for different content type links.
I'm pretty sure alot of people would appreciate if this feature got implemented.
Thanks in advance!
Comments
Comment #1
anonSorry Mattias, I cant see why alot of ppl would be interested in this. Its a very specific case you have.
If we add an extra class to all node links there will be (in most cases) unused code. So for now, I will not implement this feature.
But I ddint say ever.
Lets see what others might think about this. I will set this to postponed for now.
Comment #2
anonComment #3
controla commentedI believe support for classes based on tokens would be an extremely useful feature for this module. Not just classes but any of the attributes of the link (such as rel, class, id, etc) will benefit from token integration. I'll try to look at the code and see how far can I help, but it would certainly help if the maintainers or anyone interested could lend a hand here.
Comment #4
controla commentedComment #5
anonI dont know how to integrate tokens here as Linkit isnt a filter, and the insert process is made by javascript.
Whats your plan for this?
Comment #6
controla commentedOn the linkit profile I can configure the "Result format" field to get the tokens I need, those are presented on the autocomplete display, which I'm planning to get through jquery when clicked and insert them into the form for "class" under attributes... sounds rather simple yet unclean, I don't see what could stop this from working, haven't had the time to try it yet but it's working in my head...
Comment #7
anonComment #8
anonI cant see how this can be a generic solution so Im closing this.
If you can prove me wring, please reopen this and attach a patch or an idea.
Comment #9
Sinan Erdem commentedI dont know how it can be done but here is a very generic use-case scenario:
Normally, when I find the node, it's title and url is taken and displayed. If I can configure an attribute to get a token (maybe a field of the content), I can also use it as a class and style the link as I like. Maybe even instead of the node title, I can use a field's value on the link.
Example: Just like drupal.org issue tracker, I can point to an issue, and style it by its "Status" field value.
Comment #10
anon@sinanerdem:
The example you are refering to is a text filter, The links to issues isnt inserted with a class.
I will close this as I cant see how this could be made possible at all.
There is no server parsing at all when inserting a link and therefor tokens cant be used.