Comcode vs. Tempcode, and miniblo

Post

Posted
Rating:
Item has a rating of 5 (Liked by Patrick Schmalstig)
#9877 (In Topic #3449)
Avatar
Standard member
Malatesa is in the usergroup ‘Well-settled’
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>
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by Adam Edington)
#9881
Avatar
Site director
Patrick Schmalstig is in the usergroup ‘Administrators’
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 - Composr

(Also note there is a main_countdown block shipped with Composr you can try as well)

  • Need support for version 10? The core development team is no-longer offering it for free (unless it's a critical bug that breaks your entire site or a serious security hole). Please consider hiring me instead if you need v10 support or a non-critical bug fix. Or, ask the community in the forums!
  • Do you enjoy Composr? Please consider contributing your talent to the project or recommending Composr to others. Even small contributions make a big impact in the Composr community.
  • Do you have feedback for us? You can report bugs, suggest features, or give feedback on the Free support options page.
  • Do you need professional service with your Composr website? Please consider contracting me for your needs through my company, PDStig, LLC. Doing so will also help fund Composr development.
  • Want to watch live streams of me developing Composr CMS? Please subscribe to me on Twitch to be notified when I stream. Composr development streams are usually spontaneous / not scheduled in advance as work priorities come first.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,052 topics, 7,195 posts, 10,826 members
  • Our newest member is psychedelic1
Birthdays:
Back to Top