Community & Support

How to apply input filter on custom cck field

How can I apply the standard input filters to the contents of a custom cck field?

Currently, I use

<?php
print _filter_autop($node->field_myfield[0]['value']);
?>

but that only inserts the paragraphs.

How do I apply ALL standard filters?

Comments

Found a solution, does anyone know a better one?

Ok, my solution by now is

<?php
print check_markup($node->field_project_myfield[0]['value'], $node->format, FALSE);
?>

which seems to work so far ...

Anyone who knows a better way?

---8<--------------------------------
http://www.human-aspects.de

Subscribe. Hi just found

Subscribe. Hi just found your post, please can you say me where do you put the code above?
in .tpl files? I'm working on a solution to get image field types without image-field module
and image-cache.module

Cheers

Share your experience with the Open Source Community
it's not only a choice but a Life Philosophy !!!
http://www.adaccs.at A CSS Documetation Project

Place to put the code

I use pretty much views and especially list views.

To create a basic list view template, I use the theme wizard from adminster/views (must be activated in modules).

This code was used in one of those list view templates.

As far as list views don't pull in the complete node, it is in some cases usefull to pull in the full node with node_load();

Does that help?

--------------------------------------
http://www.human-aspects.de

---8<--------------------------------
http://www.human-aspects.de

Sorry for my ignorance ...

As a beginner, I mistake often due to lack of knowledge. At the moment I use CCK for building a Genealogy Site
you may login with: visitor psw: visitor at http://www.garschagen.at

I use 5.7 at the moment because is for me more confident, but as I have done the most I want to
go for 6.2 because I saw that everything is much easy with the view.module.

I thouth this could help mein somethink but I really have no clue. Sorry
Cheers

Share your experience with the Open Source Community
it's not only a choice but a Life Philosophy !!!
http://www.adaccs.at :a CSS Documentation Project

So, is there any question?

Asking is never ignorant and Drupal lives from the community members helping each other, leaving questions and misc answers in the forum for all other Drupal users.

If there is any question left, just feel free to ask ...

--------------------------------------
http://www.human-aspects.de

---8<--------------------------------
http://www.human-aspects.de

Works great...

This worked great for me, thanks!

Benjamin Lowenstein
benl.com

Works nicely in D6 too,

Works nicely in D6 too, thanx!

________________
Live fast die young