One way... create a tiddler that will display a "Create New Node" button while you are editing a given node. In my example, let's call it "NewNodeTemplate". Add this tag to it: "$:/tags/EditTemplate". This will force the template to be used while editing any tiddler.
Then place this in the body of the tiddler:
define Concatenate()
$(first)$$(divider)$$(second)$
end
<$set name=first value={{!!namespace}}>
<$set name="divider" filter="[all[current]has:field[namespace]]" value="/" emptyValue="">
<$set name=second value={{!!caption}}>
<$reveal type="nomatch" state="!!caption" text="">
<$button>
<$action-createtiddler $basetitle="New node" namespace=<<Concatenate>>/>
Create New Node
</$button>
</$reveal>
For this to work, you have to manually create the root tiddler/node of the namespace. So, create the "A" root tiddler. In that node create a "caption" field and put "A" in it (or whatever you want to appear in the namespace for A). Once you add the caption field the "Create New Node" button will appear. Click it to create the child node of the namespace. Warning: The node does not automatically appear in the Story River--look on the More/Recent tab in the sidebar. You should have a "New node" tiddler. Open it. It should have a namespace field pre-populated. Next, change the title and add the caption "Foo"---the "Create New Node" button should appear. Repeat.
Customize the EditTemplate tiddler for your own button text and default tiddler title. Plus if you want to automatically open the newly created tiddler in the Story River, I think there are few ways to do that. I'm not a fan of this... but you can add $savetitle="!!tiddler-title" to createtiddler widget, and add the navigate widget to display the new tiddler in the River:
define Concatenate()
$(first)$$(divider)$$(second)$
end
<$set name=first value={{!!namespace}}>
<$set name="divider" filter="[all[current]has:field[namespace]]" value="/" emptyValue="">
<$set name=second value={{!!caption}}>
<$reveal type="nomatch" state="!!caption" text="">
<$button>
<$action-createtiddler $basetitle="New node" $savetitle="!!tiddler-title" namespace=<<Concatenate>>/>
Create New Node
<$action-navigate $to={{!!tiddler-title}}/>
</$button>
</$reveal>
The only thing now is to create a Tiddler that shows the outline that you are looking for.
Does this work for you?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…