Difference between revisions of "HypertWiki:Code/lib/data"

From HypertWiki
Jump to navigation Jump to search
(code for displaying full blog entries)
(moved category generation into a separate func)
Line 185: Line 185:
</func>
</func>


<func ShowBlogPostPage>
<func MakeBlogCatgs>
  <let name=PostDate copy=data[TimeStamp] len=10 />
  <let name=wtDate>[[</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>]] ([[:category:</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>|category]])</let>
 
  <let name=wtDate append>[[category:</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>]]</let>
 
  <let name=wtTitle>__NOEDITSECTION__
==</let>
  <let name=wtTitle append copy=data[Title] />
  <let name=wtTitle append>==</let>
  <if flag=data[TextAbove]>
    <let name=wtTextBrief>
===In Brief===
</let>
    <let name=wtTextFull>
===Full Story===
</let>
    <let name=wtTextBrief append copy=data[TextAbove] />
  </if><else>
    <let name=wtTextBrief null />
  </else>
  <let name=wtTextFull append copy=data[TextBelow] />
 
   <let name=catUser copy=data[TopicsUser] />
   <let name=catUser copy=data[TopicsUser] />
   <let name=catGlob copy=data[TopicsGlobal] />
   <let name=catGlob copy=data[TopicsGlobal] />
Line 254: Line 226:
     <let name=wtCatGlob append>]]</let>
     <let name=wtCatGlob append>]]</let>


  </xploop>
</func>
<func ShowBlogPostPage>
  <let name=PostDate copy=data[TimeStamp] len=10 />
  <let name=wtDate>[[</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>]] ([[:category:</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>|category]])</let>
  <let name=wtDate append>[[category:</let>
  <let name=wtDate append copy=PostDate />
  <let name=wtDate append>]]</let>
  <let name=wtTitle>__NOEDITSECTION__
==</let>
  <let name=wtTitle append copy=data[Title] />
  <let name=wtTitle append>==</let>
  <if flag=data[TextAbove]>
    <let name=wtTextBrief>
===In Brief===
</let>
    <let name=wtTextFull>
===Full Story===
</let>
    <let name=wtTextBrief append copy=data[TextAbove] />
  </if><else>
    <let name=wtTextBrief null />
  </else>
  <let name=wtTextFull append copy=data[TextBelow] />
  <call MakeBlogCatgs />
General categories for blog posts:
General categories for blog posts:
-- the fact that it's a post:
-- the fact that it's a post:
    <let name=wtCatGlob append>[[category:data/blog/post]]</let>
  <let name=wtCatGlob append>[[category:data/blog/post]]</let>
-- date:
-- date:
    <let name=wtCatGlob append>[[category:</let>
  <let name=wtCatGlob append>[[category:</let>
    <let name=wtCatGlob append copy=PostDate len=10 /> -- just the date for the category
  <let name=wtCatGlob append copy=PostDate len=10 /> -- just the date for the category
    <let name=wtCatGlob append>|]]</let>
  <let name=wtCatGlob append>|]]</let>
    <let name=wtCatGlob append copy=PostDate /> -- full timestamp for sorting
  <let name=wtCatGlob append copy=PostDate /> -- full timestamp for sorting
    <let name=wtCatGlob append>]]</let>
  <let name=wtCatGlob append>]]</let>


  </xploop>
   <let name=user copy=data[User] />
   <let name=user copy=data[User] />
   <if flag=user>
   <if flag=user>

Revision as of 18:30, 14 February 2009