CategoryViewTemplate
special category view for blogs

%REVINFO{ " $date - $hour:$min " rev=" IF{ "%NATMAXREV%!=%CURREV%" then="%CURREV%" }: Syntax error in '%NATMAXREV%!=%CURREV%' at '%NATMAXREV%!=%CURREV%' " topic="Applications/BlogApp.CategoryViewTemplate" }% | Version 1 |

%{
}%
%TMPL:INCLUDE{"Applications.ClassificationApp.CategoryView"}%
%{
}%

%{
}%
%TMPL:DEF{"banner::title"}%<div class='natBannerTitle'>
   %CATINFO{cat="%URLPARAM{"catname" default="%BASETOPIC%"}%" format="$icon $title"}%<!-- -->
</div>
%IF{
   "defined time" 
   then="<div class='natBannerSubtitle'>%DATETIME{"%URLPARAM{"time"}%" format="$mon $year"}%</div>"
}%%TMPL:END%
%{
}%

%{
}%
%TMPL:DEF{"revinfo"}%%TMPL:END%
%{
}%

%{
}%
%TMPL:DEF{"content"}%<!-- -->
%FORMATLIST{
  "%CATINFO{
    cat="%URLPARAM{"catname" default="%BASETOPIC%"}%" 
    exclude="TopCategory"
    format="$icon=$title"
  }%%IF{"defined time"
     then=", %DATETIME{"%URLPARAM{"time"}%" format="$mon $year)"}%"
  }%"
  header="<h1 class='blogCategoryTitle'>" 
  pattern="(.*)=(.*)"
  format="$1 $2"
  footer="</h1>"
}%<!-- -->
%DBCALL{
  "Applications.BlogApp.RenderBlogEntries"
   CAT="%URLPARAM{"catname" default="%BASETOPIC%"}%"
   STICKY="%IF{"$'URLPARAM{skip}'" then="disabled" else="category"}%"
   NOSTICKY=""
   FROM_TIME="%URLPARAM{"time"}%"
   TO_TIME="%IF{"defined time" then="%DATETIME{"%URLPARAM{"time"}%" delta="in 1 month" lang="en" format="$epoch"}%"}%"
}%<!-- -->
%DBCALL{
  "Applications.BlogApp.RenderBlogEntries"
  CAT="%URLPARAM{"catname" default="%BASETOPIC%"}%"
  LIMIT="%URLPARAM{"limit" default="5"}%"
  SKIP="%URLPARAM{"skip" default="0"}%"
  NOSTICKY="category"
  STICKY=""
  FROM_TIME="%URLPARAM{"time"}%"
  TO_TIME="%IF{"defined time" then="%DATETIME{"%URLPARAM{"time"}%" delta="in 1 month" lang="en" format="$epoch"}%"}%"
}%<!-- -->
%ADDTOZONE{"head" 
  id="BLOGPLUGIN::CSS" 
  text="<link rel='stylesheet' href='%PUBURLPATH%/%SYSTEMWEB%/BlogPlugin/blogplugin.css'  media='all' />" 
}%<!-- -->
<!-- %JQREQUIRE{"hyphenator" warn="off"}% -->
<!-- -->%TMPL:END%
%{
}%

%{
}%
%TMPL:DEF{"sidebar"}%%DBCALL{"Applications.BlogApp.RenderSideBar" SIDEBAR="Category"}%%TMPL:END%
%{
}%

%{
}%
%TMPL:DEF{"subcategories"}%<!-- -->
%MAKEINDEX{ 
  "%HIERARCHY{ 
     web="%BASEWEB%" 
     top="%CAT{default="%URLPARAM{"catname" default="%BASETOPIC%"}%"}%" 
     exclude="%CAT{default="%URLPARAM{"catname" default="%BASETOPIC%"}%"}%" 
     depth="2" 
     hidenull="on"
     format="$trunctitle;$topic;$origweb$n" 
   }%" 
  cols="%CLASSIFICATIONPLUGIN_NRCOLS{default="3"}%" 
  split="\n" 
  group=""
  pattern="(.*);(.*);(.*)" 
  sort="nocase" 
  header="<noautolink><div class='blogSubCategories'>"
  format="$percntDBCALL{\"$3.$2->RenderIndexItem\" TITLE=\"$1\"}$percnt" 
  footer="</div></noautolink>"
}%<!-- -->%TMPL:END%%{
}%

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback