How to pass the SelectedValue in html.Dropdownlist MVC?

Drupal (CMS): How can I pass the full HTML version of a node's content through hook_nodeapi or node_comment?

  • I am finding a hard time finding consistent documentation about the $content object. Specifically, I want to be able to pass a node's or a comment's content including all html (meaning that if I have a link, I want to see both the link and its alternate name). How do I do that and/or where can I find relevant documentation?

  • Answer:

    Here's the simple way: $node = node_load($nid); $rendered_node = node_view($node, 'teaser'); This should get you the same data structure that gets passed to node.tpl.php.  So as long as you aren't doing anything in node.tpl.php that you shouldn't be, this should get what you need.

Dave Hansen-Lange at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.