RenderSideBar
sidebar for the blog app

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

Documentation

TODO

Parameters
  • SIDEBAR: kind of sidebar to display

Implementation

%STARTINCLUDE%%WEBLINK{
   format="<h2 class='webLink'><a class='$marker' href='$url'>$title</a></h2>" 
   web="%BASEWEB%"
}%
%DBCALL{
   "%WEB%.%TOPIC%" 
   section="%SIDEBAR{
      default="%FORMATLIST{"%FORMFIELD{"TopicType" topic="%BASEWEB%.%BASETOPIC"}%" 
                  limit="1" 
                  null="Default"
               }%"
      }%"
}%%JQREQUIRE{"serialpager"}%%STOPINCLUDE%

Default sidebar

%STARTSECTION{"Default"}%<div class="blogSideBarSection blogAbout"> 
%WEBSUMMARY%
</div> 
%DBCALL{"Applications.BlogApp.RenderAuthorTools"}%<!-- -->
%DBCALL{"Applications.BlogApp.RenderRecentComments" 
  LIMIT="5" 
  %IF{"'%BASEWEB%.%BASETOPIC%'/TopicType=~'Category'" 
    then="CAT=\"%URLPARAM{"catname" default="%BASETOPIC%"}%\""
  }%
}%<!-- -->
%DBCALL{"Applications.BlogApp.RenderCategories"}%<!-- -->
%DBCALL{"Applications.BlogApp.RenderArchives"}%<!-- -->
<!-- -->%ENDSECTION{"Default"}%

Admin sidebar

%STARTSECTION{"Admin"}%<!-- -->
<div class="blogSideBarSection blogAbout"> 
  <p>You are in the admin section. This area should only be accessible to admins of this blog.</p>
</div> 
%DBCALL{"Applications.BlogApp.RenderAuthorTools"}%<!-- -->
<!-- -->%ENDSECTION{"Admin"}%

Blog Entry sidebar

%STARTSECTION{"BlogEntry"}%<!-- -->
<div class="blogSideBarSection blogAbout"> 
%WEBSUMMARY%
</div> 
%DBCALL{"Applications.BlogApp.RenderAuthorTools"}%<!-- -->
%IF{"context SolrPluginEnabled"
   then="$percntDBCALL{\"Applications.BlogApp.RenderSimilarBlogEntries\"}$percnt"
}%<!-- -->
%DBCALL{"Applications.BlogApp.RenderRecentBlogEntries"
  LIMIT="5"
  CAT="%CATINFO{topic="%BASEWEB%.%BASETOPIC%" format="$name" limit="1" exclude="TopCategory"}%"
}%<!-- -->%ENDSECTION{"BlogEntry"}%

Category sidebar

%STARTSECTION{"Category"}% <!-- -->
<div class="blogSideBarSection blogAbout"> 
%WEBSUMMARY%
</div> 
%DBCALL{"Applications.BlogApp.RenderAuthorTools"}%<!-- -->
%DBCALL{"Applications.BlogApp.RenderCategories" CAT="%URLPARAM{"catname" default="%BASETOPIC%"}%"}%<!-- -->
%DBCALL{"Applications.BlogApp.RenderRecentComments" 
  CAT="%URLPARAM{"catname" default="%BASETOPIC%"}%" 
  LIMIT="5"
}%<!-- -->
%DBCALL{"Applications.BlogApp.RenderArchives"
  CAT="%URLPARAM{"catname" default="%BASETOPIC%"}%" 
}%<!-- -->%ENDSECTION{"Category"}%

Nosidebar

%STARTSECTION{"Nosidebar"}%%ENDSECTION{"Nosidebar"}%

Calls to 'RenderSideBar'

Copyright

© 2005-2019 http://michaeldaumconsulting.com

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Warning: Can't find topic Applications/BlogApp.WebLeftBarExample

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