Click here to show or hide the menubar.

Nodes with types in directories


Ted Howard found a problem when he tried to define a nodetype with a template. When the node appears in a directory it's not linked to anything. This is because it is not any type we know of and the directory displayer was told to consider these things as text, not really nodes. Ted thinks it should be linked, and I agree.

In html.directory.viewDirectory there's a branch in its addItem routine that deals with nodes that have a type attribute. We pull out some we have special code for and then, if there's a callback defined to render the nodetype, we hot it up. The change required here would be to remove the requirement that we have a callback defined. Just hot it up if there's a type attribute on the node. Period. That's what I'm doing, let's see if it causes any problems.

Parts

html.directory.viewDirectory


Posted on Friday, March 09, 2012 at 11:27 AM by Dave Winer.