Support (offered by community volunteers) > Using Drupal Modules

Views 3 Integration - support html markup in Notes field types

(1/2) > >>

ddunn:
Views does not handle the Notes field correctly, but displays the html tags and does not check_markup()

This is a repost of a 2010 instance of the same issue: http://forum.civicrm.org/index.php/topic,10259.0.html

I tried to follow the hint (from that posting) to create a custom views field tpl.php, but I'm not savvy enough to get it to work for me.  :-[

I'm on D7, Views3 and CiviCRM 4.1.2

Would appreciate any direction or guiding steer. Thanks!

DD

Hershel:

--- Quote from: ddunn on June 19, 2012, 06:07:42 am ---
I tried to follow the hint (from that posting) to create a custom views field tpl.php, but I'm not savvy enough to get it to work for me.  :-[

--- End quote ---

Click on Advanced, then "Information" next to Theme, when editing your View.

Then find the file you want to replace, choose one of the non-bold names and create a file with that name in your theme directory. Put in that file the code from that other post.

ddunn:
Hi Hershel,

Thanks - that's opened up a whole world of theming customisation for me.

I've managed to be able to correctly create a tpl.php file to override the default theming. However, I'm still not managing to achieve the desired result.  :(

Applying check_markup($row, 1)  [ and check_markup($field->raw, 1) ] displays nothing for me.

I noticed something, which I'm not sure is relevant. If I choose, in Views UI, to remove all html from the field. The display still presents the html tags


--- Code: ---<p> Loads of details</p> <p> Even some more:</p> <ul> <li> first</li> <li> second</li> <li> third</li> <li> fourth</li> </ul>
--- End code ---

Looking at it when this option is not selected, the output looks like this:


--- Code: ---<span class="field-content"><p>&lt;p&gt;<br>
Labels&lt;/p&gt;<br>
&lt;p&gt;<br>
Even some more:&lt;/p&gt;<br>
&lt;ul&gt;<br>
&lt;li&gt;<br>
first&lt;/li&gt;<br>
&lt;li&gt;<br>
second&lt;/li&gt;<br>
&lt;li&gt;<br>
third&lt;/li&gt;<br>
&lt;li&gt;<br>
fourth&lt;/li&gt;<br>
&lt;/ul&gt;</p></span>
--- End code ---

So, I'm still all confused. Can you spot what I'm doing wrong?

Hershel:
I'm not sure. I would have to see the site.

ddunn:
I'm heading out now to an all day event, but maybe you could take a look if I sent you the details later on?

I'd much appreciate it, and would love to help with anything (perhaps documentation) in return.

Thanks

David

Navigation

[0] Message Index

[#] Next page

Go to full version