RenderBlogEntryTitle
renders the heading section of a BlogEntry

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

Documentation

Parameters
  • THETOPIC, defaults to BASEWEB.BASETOPIC
  • TITLE_EXTRA
  • SHOWREVINFO: boolean flag to switch on/off revinfo

Implementation

%STARTINCLUDE%<noautolink><h1 itemprop="headline">
[[%THETOPIC{default="%BASEWEB%.%BASETOPIC%"}%][<span itemprop='name'>%GETTOPICTITLE{topic="%THETOPIC{default="%BASEWEB%.%BASETOPIC%"}%" rev="%URLPARAM{"rev"}%"}%</span>]] %IF{
   "defined TITLE_EXTRA and not isempty TITLE_EXTRA" 
   then="<span class='foswikiTopicExtra'>%TITLE_EXTRA%</span>"
}%%IF{
   "'%THETOPIC{default="%BASEWEB%.%BASETOPIC%"}%'/Summary"
   then="<div class='foswikiTopicSummary'>$percntFORMFIELD{\"Summary\" topic=\"%THETOPIC{default="%BASEWEB%.%BASETOPIC%"}%\" rev=\"%URLPARAM{"rev"}%\"}$percnt</div>"
}%</h1>
%IF{"'%SHOWREVINFO{default="on"}%'='on'"
   then="$percntDBCALL{\"%WEB%.%TOPIC%\" section=\"revinfo\" THETOPIC=\"%THETOPIC{default="%BASEWEB%.%BASETOPIC%"}%\"}$percnt"
}%</noautolink>%STOPINCLUDE%

Revision info

%STARTSECTION{"revinfo"}%<div class="blogInfo">
  %DBQUERY{
    topic="%THETOPIC%" 
    format="%JQICON{"fa-calendar"}% <span itemprop='datePublished' content='$formatTime(publishdate, '$year-$mo-$day')'>$formatTime(publishdate)</span>
      <span class='foswikiRevisionSep'>&#124;</span> %JQICON{"fa-user"}% $percntFORMATLIST{
      \"$expand(Author or createauthor)\" 
      split=\"\s*,\s*\" 
      format=\"$dollarpercntIF{\\"istopic '%USERSWEB%.$1'\\" then=\\"<a href='%SCRIPTURLPATH{view}%/%USERSWEB%/$1' rel='author' itemprop='author'><span itemprop='name'>$dollarpercntGETTOPICTITLE{%USERSWEB%.$1}$dollarpercnt</span></a>\\" else=\\"<nop>$1\\"}$dollarpercnt\" 
      separator=\", \"
    }$percnt"
  }%
  %DBQUERY{"total_likes>0" 
     topic="%THETOPIC%" 
     format="<span class='foswikiRevisionSep'>&#124;</span> %JQICON{"fa-thumbs-o-up" class="fa-flip-horizontal"}% $expand(total_likes)" 
  }%<!-- --> 
  %CATINFO{
    "%THETOPIC%" 
    exclude="TopCategory"
    header="<span class='foswikiRevisionSep'>&#124;</span> %JQICON{"fa-folder"}% "
    format="<a href='$url' rel='tag' itemprop='keywords' class='$name'><noautolink>$title</noautolink></a>"
  }% <!-- -->
  %TAGINFO{
    "%THETOPIC%"
    header="<span class='foswikiRevisionSep'>&#124;</span> %JQICON{"fa-tag"}% "
    format="<a href='$url' rel='tag' itemprop='keywords' class='$class'><noautolink>$name</noautolink></a>"
  }% <!-- -->
</div>%ENDSECTION{"revinfo"}%

Test

Welcome to BlogPlugin 2.0
test summary

| Henry Miller, Stefan Zweig | | , , , , ,

Calls to 'RenderBlogEntryTitle'

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