[development] View Source in Drupal

Adam Gregory arcaneadam at gmail.com
Tue Oct 26 14:01:38 UTC 2010


It would be a pretty trivial exercise to accomplish this. Just create a
module that adds a "View source" tab to the node. Then for that tabs content
simply render the output of node_view($node) into a textarea.
Boom! Quick and easy "view node source".
-----
Adam A. Gregory
Drupal Developer & Consultant
Web: AdamAGregory.com
Twitter: twitter.com/adamgregory
skype: aagregory2
Phone: 910.808.1717
Cell: 919.306.6138


On Tue, Oct 26, 2010 at 12:33 AM, Michael Favia <michael at favias.org> wrote:

> On Mon, Oct 25, 2010 at 10:59 PM, Jin Guang Zheng <zhengj3 at rpi.edu> wrote:
>
> > I am wondering if anyone knows whether there is a module that provides
> > viewing source code of nodes in Drupal as Wikipedia's view source.
>
> The source of a drupal node is derived from the "body" of the node,
> its associated "field output" and any other modules that care to hook
> into the rendering of the node upon display. As such there isn't
> really a "view source" as the process for rendering each node content
> type is unique and determined by the developer who implemented the
> node type. This is also what makes drupal a powerful multipurpose tool
> (i.e. not just encyclopedia articles). Your best bet is to research
> drupal theming and fields. The $node->content variable might be of
> assistance on D6 and $content on D7. Good luck. -mf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20101026/36829c8f/attachment.html 


More information about the development mailing list