Closed (fixed)
Project:
Node displays contributions
Version:
6.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2010 at 19:18 UTC
Updated:
29 Apr 2015 at 07:00 UTC
Jump to comment: Most recent
Comments
Comment #1
weka commentedYou probably get more responses from the Views displays module users.
Comment #2
swentel commentedYou can create a new field at admin/ds/nd/fields and use following code:
That will make the widget available as a field in the layout screen of DS.
Comment #4
yeken commentedinstead of $object object you should use $entity object (says below the code textarea)
Comment #5
pardalman commentedThat works for node, but in my case: I want to show the widget for comments, how can I do it?
Thanks in advance!
Comment #6
Nikki Aiuto commentedI was able to get the widget working for comments by using the code in #4 but using the entity cid, not nid.
Comment #7
grn commentedThe 'node' should be changed to 'comment' I think.
BR. GrN.dk
Comment #8
Sigvard commentedFinding the widget ID is very straightforward with Firebug if you can get the rate widget to display somewhere (my problem was that it showed up in comments but not in content).
But a very effective tactic is to just guess the nr as the first widget got the ID "1" and so on.
Comment #9
designarti commentedWorked with #4 in a code field, DS text format. DS version 7.x-2.6 - Drupal 7.30.
Thank you so much, yeken!
Comment #10
BartNijs commentedI've tried #4 but no luck.
Drupal 7.36, DS 7x-.28, Rate 7x-1.6
This is what I did:
When I add this field to the display of a node I get this error:
Notice: Undefined index: name in _field_ui_reduce_order() (line 81 of abc/modules/field_ui/field_ui.admin.inc)UPDATE
I added the code to node.tpl.php and if I replace $entity with $node the code seems to work.
Still no luck in DS though.
UPDATE 2
The problem I had was a field group issue. Problem solved.