AVR32 Linux Developer Blog

Function: RenderSideBar

Render the sidebar navigation

See also BlogHelpText

Parameters

  • SIDEBAR: kind of sidebar to display
  • SIDEBARARG: extra parameter for the admin sidebar

Implementation

%STARTINCLUDE%
*~~
<div class="blogSideBar">
---+ About
*~~ %REDDOT{"%WEB%.BlogAbout"}%
<div class="blogAbout">
%IFDEFINEDTHEN{"%SIDEBAR%"}%
%$nopDBCALL{"BlogHelpText" section="%SIDEBAR%"}%
%ELSEDEFINED%
%$nopDBCALL{"BlogHelpText" section="Default"}%
%FIDEFINED%
</div>

%IFDEFINEDTHEN{"%CALC{"$IF($EXACT(%SKIN%,pattern),true)"}%"}%
%$nopINCLUDE{"%TWIKIWEB%.WebLeftBarSearch"}%
%ELSEDEFINED%
%IFSKINSTATETHEN{searchbox="pos2"}%
<div class="natSearchBox natSearchBoxPos2">
%$nopTMPL:P{"searchbox"}%
<p />
</div>
%FISKINSTATE%
%FIDEFINED%

%IFDEFINEDTHEN{"%SIDEBAR%"}%
%$nopDBCALL{"%TOPIC%" section="%SIDEBAR%"}%
%ELSEDEFINED%
%$nopDBCALL{"%TOPIC%" section="Default"}%
%FIDEFINED%

<!-- todo move it to somewhere else -->
<style type="text/css">
.natRevision,
.natWebLocator {
   display:none;
}
</style>
*~~
</div>
%STOPINCLUDE%

Default sidebar

%STARTSECTION{"Default"}%
*~~
%DBCALL{"RenderAuthorTools" warn="off"}%
%DBCALL{"RenderAdminTools" warn="off"}% 
%DBCALL{"RenderRecentComments" LIMIT="5" CAT=".*"}%
%DBCALL{"RenderRecentPostings" LIMIT="10"}%
%DBCALL{"RenderPages" CAT=".*"}%
%DBCALL{"RenderArchives"}%
%DBCALL{"RenderCategories"}%
%DBCALL{"RenderBlogRoll" CAT=".*"}%
%DBCALL{"RenderVisitors"}%
%IFDEFINEDTHEN{"%TECHNORATICODE%" glue="off"}%
---+ Technorati
<script type="text/javascript" src="http://embed.technorati.com/embed/%TECHNORATICODE%.js"></script>
%FIDEFINED%
%ENDSECTION{"Default"}%

Page sidebar

%STARTSECTION{"Page"}%
*~~
%DBCALL{"RenderAuthorTools" warn="off"}%
%DBCALL{"RenderAdminTools" warn="off"}% 
%DBCALL{"RenderRelatedEntries" NAME="%BASETOPIC%"}% 
%ENDSECTION{"Page"}%

Admin sidebar

%STARTSECTION{"Admin"}%
*~~
%DBCALL{"RenderNewTopicTypeForm"
         NAME="%IFDEFINED{"%SIDEBARARG%" then="%SIDEBARARG%" else="%INCLUDINGTOPIC%"}%" 
    TEMPLATE="%IFDEFINED{"%SIDEBARARG%" then="%SIDEBARARG%Template" else="%INCLUDINGTOPIC%Template"}%"
    warn="off"}%
%DBCALL{"RenderValidateButton" TEXT="Validate Html" warn="off"}%
%DBCALL{"RenderTopicTypes" 
         NAME="%IFDEFINED{"%SIDEBARARG%" then="%SIDEBARARG%" else="%INCLUDINGTOPIC%"}%"}%
%ENDSECTION{"Admin"}%

Entry sidebar

%STARTSECTION{"Entry"}%
*~~
%DBCALL{"RenderAuthorTools" warn="off"}%
%DBCALL{"RenderAdminTools" warn="off"}%
%DBCALL{"RenderRelatedEntries" NAME="%BASETOPIC%"}% 
%DBCALL{"RenderRecentPostings" LIMIT="10"}%
%ENDSECTION{"Entry"}%

Aggregation sidebar

%STARTSECTION{"Aggregation"}%
*~~
%DBCALL{"RenderAuthorTools" warn="off"}%
%DBCALL{"RenderAdminTools" warn="off"}%
%DBCALL{"RenderBlogRoll" CAT=".*"}%
%ENDSECTION{"Aggregation"}%

Archive sidebar

%STARTSECTION{"Archive"}%
*~~
%DBCALL{"RenderAuthorTools" warn="off"}%
%DBCALL{"RenderAdminTools" warn="off"}%
%DBCALL{"BlogHelpText" section="Archive2"}%
%ENDSECTION{"Archive"}%

Category sidebar

%STARTSECTION{"Category"}%
*~~
%DBCALL{"RenderAuthorTools" warn="off"}%
%DBCALL{"RenderAdminTools" warn="off"}%
%DBCALL{"RenderRecentComments" LIMIT="10" CAT="%BASETOPIC%"}%
%DBCALL{"RenderRecentPostings" LIMIT="10" CAT="%BASETOPIC%"}%
%DBCALL{"RenderPages" CAT="%BASETOPIC%"}%
%DBCALL{"RenderArchives" CAT="%BASETOPIC%"}%
%DBCALL{"RenderCategories"}%
%DBCALL{"RenderBlogRoll" CAT="%BASETOPIC%"}%
%ENDSECTION{"Category"}%

Nosidebar sidebar

%STARTSECTION{"Nosidebar"}% 
*~~
%ENDSECTION{"Nosidebar"}%

Calls to 'RenderSideBar'

TopicForm
TopicType: TopicFunction
TopicDescription: Render the sidebar navigation
r1 - 2006-02-06 - 15:39:38 - TWikiContributor
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.