Comcode vs. Tempcode, and miniblo

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by PDStig)
#8077 (In Topic #2041)
I think I'm going to work on a new website using Composr, now that v11 is coming along (thanks Patrick!)

Ignorant question here. I looked all over for the answer, but I can't find it. 

Second, here's CLOSED_SITE.tpl. How would I execute a miniblock inside of a Template file?

Code

{$SET,login_screen,1}

{$REQUIRE_CSS,messages}

<div class="closed-site-special-message">
   <div class="closed-site-special-message-inner">
      <div class="box box---closed-site"><div class="box-inner">
         <h2>{$SITE_NAME*}</h2>

         <p>
            {CLOSED} [block="5 Apr 2063"]countdown_timer[/block]
         </p>
         {+START,IF,{$IS_GUEST}}
            <p>
               {+START,IF_NON_EMPTY,{JOIN_URL}}
                  {$,Re-enable if you want to allow people to easily join when the site is closed (or just give them the URL) <a class="btn btn-primary btn-scr menu--site-meta--user-actions--join" href="\{JOIN_URL*\}"><span>{+START,INCLUDE,ICON}NAME=menu/site_meta/user_actions/join{+END} \{!JOIN\}</span></a>}
               {+END}
               <a class="btn btn-primary btn-scr menu--site-meta--user-actions--login" data-open-as-overlay="{}" rel="nofollow" href="{LOGIN_URL*}">{+START,INCLUDE,ICON}NAME=menu/site_meta/user_actions/login{+END} <span>{!_LOGIN}</span></a>
            </p>
         {+END}
      </div></div>
   </div>
</div>

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by Adam Edington)
#8081
Since this is a template and not a Comcode page, you shouldn't use Comcode syntax but instead Tempcode syntax.

Try

Code

{$BLOCK,block=countdown_timer,param=5 Apr 2063}


More info:

Composr Tutorial: Tempcode programming

Open Source CMS with advanced social, interactive and dynamic features. Fully flexible, themeable and extendible: suitable for building powerful websites.

View



(Also note there is a main_countdown block shipped with Composr you can try as well)
0 guests and 0 members have recently viewed this.