• List of Empty Pages

    By Jeff Parr 1 decade ago

    A list of pages that have been linked to in another page but have not been created?

    We are using the wiki to do some brainstorming and I find the best way to do this for me is to just create WikiLinks to pages whenever I think something deserves its own page. I tend to create documents full of links to pages that don't exist yet.

    I like to go to a list of empty topics and choose whichever is interesting to me at the time and work on it.

    Currently, I solve this by going though a doc that I have created and clicking on each link to a page that doesn't exist. I put some token text in the new page and assign it to an emptypage or todo category.

    • Possible Solution

      By Jeff Parr 1 decade ago

      Its always interesting to look inside other developers' minds. DominoWiki has a very nice, clean code base. I salute the developers! I have not done so much parsing in LS so I learned something too.

      Currently when a page is saved the WikiPage.class script only populates the Links field if the linked-to-page exists.

      If findPage(txt) Is Nothing Then

      link = txt &amp; {&lt;a href=&quot;/} &amp; dbpath &amp; {/wiki?openform&amp;page=} &amp;_<br/>
      txt &amp; {&quot; class=&quot;wiki-newpagelink&quot;&gt;?&lt;/a&gt;}<br/>


      // Update back links for this page<br/>
      Call updateLinks(txt)<br/>
      link = {&lt;a href=&quot;/} &amp; dbpath &amp; {/pages/} &amp; txt &amp; {&quot;&gt;} &amp;_<br/>
      txt &amp; &quot;&lt;/a&gt;&quot;<br/>

      End If

      This creates another issue that is pretty minor but…

      • Link to a non-existent-page then save the doc
      • Come back and click on the non-existent-page to create it.
      • The backlink will not be updated until the original doc is resaved.

        If updateLinks(txt) were run on every WikiLink then we could implement the "List Empty Pages" feature with an agent that steps through the backlinks view and outputs links when findPage() is nothing.

        Possible drawbacks
      • Backlinks view will get bigger. Could have performance hits in other parts of the system that I don't know about.
      • Not very scalable. Running an agent in this way on a large wiki could be resource intensive.

        I hesitate to code this up without some feedback. You guys know this thing way better than me. I've been using it for 2 days.