Not all types have code associated to them. Thus 'viewcode' type actions wont do anything useful. For nodes like this the place where code is found is under the relevent display page for type X.

Lets use sourcecodesection as an example. These nodes are "dumb" in the sense that they dont have evaluatable code associated to them. However they do have an overriden display page: sourcecodesection display page and it is there that you would look to change how such a nodetype behaves. Some node types have many overriden display types, some only a few. All inherit a large number of display modes from the node type heirarchy. A good place to inspect this info in a holistic way is via the type tree and more specifically via the types own page.

Incidentally all of this can be seen in the pmdev nodelet. At the top of the nodelet it will say something like

#11911 = strangedoc via strangedoc display page
. When the viewcode link isnt available normally you will want to look at the page indicated by the 'via' link.

This node is a response to a question i received via /msg that I figured would be useful to others. Cheers.

---
demerphq


In reply to Why doesn't 'viewcode' work for type X? by demerphq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.