Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

This document applies to Jamroom 3 only!
For current Jamroom 4 Documentation, visit the main Jamroom Documentation section.

{jr_submit_reddit} Index {jr_user_check}


The {jr_unique_block} template block function ensures that any code (i.e. HTML, etc.) placed between the "open" and "close" function calls will only ever show 1 time on the output, even if looped over and included into a template a hundred times.


Name Type Required Default Description
name string yes n/a The "name" parameter is a unique string that differentiates the {jr_unique_block} function call from other {jr_unique_block} function calls that may be in the same template.  Without this parameter, Jamroom is not able to link the OPEN and CLOSE calls of the function.


If you have parts of your page repeating too many times, the jr_unique_block provides a solution. You can use the function in a row template to output a "once only" title even though the row may be looped many times. You can also use a variable as the name, for example $USER_NICKNAME in a page which shows a list of favorites for several Users. This will provide the Heading row only once per User:

{* The jr_unique_block function ensures the title only shows 1 time *}
{jr_unique_block name="$USER_NICKNAME"}
  <td width="100%" colspan="5" class="head-1" style="height: 50px;">
      <span style="font-size: 22px">{$USER_NICKNAME}'s Favorites</span>    
...the rest of the row_template code goes outside of the block so it will be repeated as many times as is is looped...


Note: Be sure to give a unique "name" to each block you use in your themes, so the internal variable that Jamroom holds the information in while it is working don't overlap. Your Artist sites will rebuild faster as a result.


{jr_submit_reddit} page 175 of 185 {jr_user_check}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Support Center
Contact Support
Community Forum
Member Sites
About Us
Contact Us
Privacy Policy
©2003 - 2023 The Jamroom Network