]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/structured_page_data.mdwn
tagging description-logic-related ideas (at least, for myself)
[ikiwiki.git] / doc / todo / structured_page_data.mdwn
index 2a196ed23b642beff60314b51164a3ac3a300465..72bfd8dea123e44e691554192f1df3e04453a376 100644 (file)
@@ -82,6 +82,10 @@ See also:
 >    rather than all pages linked from a given page.
 >
 >The first use case is handled by having a template in the page creation.  You could
+
+
+
+
 >have some type of form to edit the data, but that's just sugar on top of the template.
 >If you were going to have a web form to edit the data, I can imagine a few ways to do it:
 >
@@ -243,8 +247,9 @@ in a large number of other cases.
 
 > would match `data_eq(Depends on,6)`, `data_link(Depends on,bugs/bugA)`, `data_link(Depends on,bugs/bugB)`
 > or, if you applied the patch in [[todo/tracking_bugs_with_dependencies]] then you can use 'defined pagespecs'
-> such as `data_link(Depends on,~openBugs)`.  The ability to label links like this allows separation of
+> such as `data_link(Depends on,~openBugs)`. <a id="another_kind_of_links" />The ability to label links like this allows separation of
 > dependencies between bugs from arbitrary links.
+>> This issue (the need for distinguished kinds of links) has also been brought up in other discussions: [[tracking_bugs_with_dependencies#another_kind_of_links]] (deps vs. links) and [[tag_pagespec_function]] (tags vs. links). --Ivan Z.
 
 ----
 
@@ -257,21 +262,21 @@ in a large number of other cases.
     use CGI::FormBuilder;
     use IkiWiki 2.00;
     
-    sub import { #{{{
+    sub import {
        hook(type => "getsetup", id => "form", call => \&getsetup);
        hook(type => "htmlize", id => "form", call => \&htmlize);
        hook(type => "sessioncgi", id => "form", call => \&cgi_submit);
-    } # }}}
+    }
     
-    sub getsetup () { #{{{
+    sub getsetup () {
        return
                plugin => {
                        safe => 1,
                        rebuild => 1, # format plugin
                },
-    } #}}}
+    }
     
-    sub makeFormFromYAML ($$$) { #{{{
+    sub makeFormFromYAML ($$$) {
        my $page = shift;
        my $YAMLString = shift;
        my $q = shift;
@@ -350,9 +355,9 @@ in a large number of other cases.
        # IkiWiki::decode_form_utf8($form);
        
        return $form;
-    } #}}}
+    }
     
-    sub htmlize (@) { #{{{
+    sub htmlize (@) {
        my %params=@_;
        my $content = $params{content};
        my $page = $params{page};
@@ -360,9 +365,9 @@ in a large number of other cases.
        my $form = makeFormFromYAML($page, $content, undef);
     
        return $form->render(submit => 'Update Form');
-    } # }}}
+    }
     
-    sub cgi_submit ($$) { #{{{
+    sub cgi_submit ($$) {
        my $q=shift;
        my $session=shift;
        
@@ -425,11 +430,11 @@ in a large number of other cases.
        }
     
        exit;
-    } #}}}
+    }
     
     package IkiWiki::PageSpec;
     
-    sub match_form_eq ($$;@) { #{{{
+    sub match_form_eq ($$;@) {
        my $page=shift;
        my $argSet=shift;
        my @args=split(/,/, $argSet);
@@ -460,7 +465,7 @@ in a large number of other cases.
        } else {
                return IkiWiki::FailReason->new("field value does not match");
        }
-    } #}}}
+    }
     
     1
 
@@ -476,22 +481,22 @@ in a large number of other cases.
     
     my $inTable = 0;
     
-    sub import { #{{{
+    sub import {
        hook(type => "getsetup", id => "data", call => \&getsetup);
        hook(type => "needsbuild", id => "data", call => \&needsbuild);
        hook(type => "preprocess", id => "data", call => \&preprocess, scan => 1);
        hook(type => "preprocess", id => "datatable", call => \&preprocess_table, scan => 1);   # does this need scan?
-    } # }}}
+    }
     
-    sub getsetup () { #{{{
+    sub getsetup () {
        return
                plugin => {
                        safe => 1,
                        rebuild => 1, # format plugin
                },
-    } #}}}
+    }
     
-    sub needsbuild (@) { #{{{
+    sub needsbuild (@) {
        my $needsbuild=shift;
        foreach my $page (keys %pagestate) {
                if (exists $pagestate{$page}{data}) {
@@ -506,7 +511,7 @@ in a large number of other cases.
        }
     }
     
-    sub preprocess (@) { #{{{
+    sub preprocess (@) {
        my @argslist = @_;
        my %params=@argslist;
        
@@ -546,9 +551,9 @@ in a large number of other cases.
        }
        
        return $html;
-    } # }}}
+    }
     
-    sub preprocess_table (@) { #{{{
+    sub preprocess_table (@) {
        my %params=@_;
     
        my @lines;
@@ -568,11 +573,11 @@ in a large number of other cases.
        push @lines, '</table>';
     
        return join("\n", @lines);
-    } #}}}
+    }
     
     package IkiWiki::PageSpec;
     
-    sub match_data_eq ($$;@) { #{{{
+    sub match_data_eq ($$;@) {
        my $page=shift;
        my $argSet=shift;
        my @args=split(/,/, $argSet);
@@ -592,9 +597,9 @@ in a large number of other cases.
        } else {
                return IkiWiki::FailReason->new("value does not match");
        }
-    } #}}}
+    }
     
-    sub match_data_link ($$;@) { #{{{
+    sub match_data_link ($$;@) {
        my $page=shift;
        my $argSet=shift;
        my @params=@_;
@@ -618,6 +623,6 @@ in a large number of other cases.
        }
     
        return IkiWiki::FailReason->new("No data link on page $page with key $key matches glob $value");
-    } #}}}
+    }
     
     1