Active
Project:
Views Custom Field
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jul 2011 at 03:54 UTC
Updated:
24 Aug 2011 at 20:58 UTC
Greetings,
I want to highlight some items in a view based on a content flag. My idea is to use a custom field at the beginning of the field list to open a div and another at the end to close:
<?php if ('Y' == $data->node_data_field_att_field_att_value)
echo '<div class="attention-alert"> sample text ';
?>
what I get is
<div class="attention-alert"> sample text </div>
the trailing
is NOT wanted and NOT specified.
I close the div myself with another custom field at the end of the field list.
Why is the
there? More importantly, how can I get rid of it?
help!
Comments
Comment #1
IncrediblyKenzi commentedIs this in your views template? I would recommend putting it there rather than introducing a custom field, you add the conditional to the views template.
See: http://drupal.org/node/312220 for info on how.
Also, the http://drupal.org/project/flag_classes project looks like it could use some help moving along as well, but might be a starting point (release is on github).
Comment #2
Peter76 commentedMake a new Input format and deselect all filters especially HTML filter.
Now in views field select that input format.