Monday, November 08, 2010 at 12:01 AM.
system.verbs.apps.Manila.nodeTypes.types.manilaSite.expand
<<Make sure there's a Stories node.
<<10/10/00; 1:31:15 AM by PBS
local (origCursor = op.getCursor ());
local (siteUrl);
op.attributes.getOne ("siteUrl", @siteUrl);
op.setDisplay (false);
op.expand (1);
op.go (right, 1);
local (flFound = false);
loop {
local (type);
op.attributes.getOne ("type", @type);
if type == "manilaStoriesContainer" {
flFound = true;
break};
if not (op.go (down, 1)) {
break}};
if not flFound { //not found? Add Stories node
op.insert ("Stories", down);
local (atts);
new (tableType, @atts);
atts.type = "manilaStoriesContainer";
atts.siteUrl = siteUrl;
atts.url = siteUrl + "stories/";
atts.baseDiscussUrl = siteUrl + "discuss/";
op.attributes.addGroup (@atts)};
op.setCursor (origCursor);
op.collapse ();
op.setDisplay (true);
return (false)
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.