solved How to add follow button to a template.

alt=
duke
@musamensa
4 years ago
248 posts
Hi,
I am trying to add a follow button using the code below

{jrCore_lang id=5 skin="Mobile" default="Follow" assign="Follow"}
{jrFollower_button profile_id=$_profile_id titl=$follow}

but I keep getting an error that reads
{jrFollower_button} required parameter "profile_id" is missing ()


Thanks again.

updated by @musamensa: 11/14/20 10:19:17AM
douglas
@douglas
4 years ago
2,767 posts
What template are you putting this code in?

Most likely the variable $_profile_id is not set, and the $follow variable is also probably not set.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

updated by @douglas: 08/15/20 09:09:49AM
alt=
duke
@musamensa
4 years ago
248 posts

<div class="container">
    {if isset($_items)}
        {foreach from=$_items item="item"}

            {if $item@first || ($item@iteration % 6) == 1}
                <table>
            {/if}
            
            
   <tr class="{cycle values=""}">
                <td class="page_table_cell center" style="width:10%;padding-bottom: 20px; border-radius: 5px;">{jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_image" item_id=$item._profile_id size="large" crop="portrait" class="img_scale" style="margin:0" alt="@`$item.profile_url`" title="@`$item.profile_url`"}</td>
                
                <td class="page_table_cell" style="width:30%;padding-left:10px;vertical-align: text-top;font-size: 18px; font-weight: 600;"><a style="color: #151515d6" href="{$jamroom_url}/{$item.profile_url}");">{$item.profile_name}</a> 
                <br>
            <div style="font-size: 13px;font-weight: lighter;color: #0000005e;">Joined {$item._created|jrCore_date_format:"relative"}</div>
                <div> </div>
 
                
                </td>
                
                
           
                
               
            </tr>
            
          
            {if $item@last || ($item@iteration % 6) == 0}
                </table>
            {/if}

        {/foreach}
    {/if}
    
    
</div>

douglas
@douglas
4 years ago
2,767 posts
See if this works for you:

{jrCore_lang id=5 skin="Mobile" default="Follow" assign="Follow"}
{jrFollower_button profile_id=$item._profile_id title=$Follow}

Hope this helps


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

updated by @douglas: 08/16/20 05:43:56AM
alt=
duke
@musamensa
4 years ago
248 posts
Worked perfectly!
Thanks always

Tags