solved How do I make the profile_sidebar.tpl section to hide when a profile page is viewed.

alt=
duke
@musamensa
4 years ago
253 posts
I am working on a custom skin based on the Audio Pro skin and I would like to hide the profile sidebar section from selected profile pages like (timeline and blog) whenever the page is viewed from mobile.

I am currently looking at the profile_item_index.tpl page but I can't seem to make much sense of it.

https://itembo.com/toyenmusic1/uploaded_audio
https://itembo.com/toyenmusic1/timeline

Thanks


updated by @musamensa: 11/23/20 09:53:24PM
douglas
@douglas
4 years ago
2,791 posts
You'll want to use an if statement around the function that includes the profile_sidebar.tpl, it might look something like this:

{if !jrCore_is_mobile()}
    {jrCore_include template="profile_sidebar.tpl"}
{else}
    {if $_post.module != 'blog' || $_post.module != 'timeline'}
        {jrCore_include template="profile_sidebar.tpl"}
    {/if}
{/if}

You can add this code:

{debug}

to any template and a Smarty popup window will show you what variables are available in said template.

Hope this helps!


--

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

updated by @douglas: 08/16/20 06:38:57AM
douglas
@douglas
4 years ago
2,791 posts
Sorry, try this instead.

{if !jrCore_is_mobile()}
    {jrCore_include template="profile_sidebar.tpl"}
{else}
    {if $_post.module != 'jrBlog' || $_post.module != 'jrAction'}
        {jrCore_include template="profile_sidebar.tpl"}
    {/if}
{/if}



--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
duke
@musamensa
4 years ago
253 posts

{if $_conf.Mobile_profile_side == 'right'}
    {jrCore_include template="profile_sidebar.tpl"}
    {$last = 'last'}
{/if}



<section>
<div class="col4" style="background: #ffffff;
	bottom: 0;
	content: " ";
	margin-left: -10px;
	position: absolute;
	top: 0;
	width: 1px;"> {jrCore_include template="profile_sidebar.tpl"}






</div>
<div class="col6 last" style="margin-left=20px">
<div class="">
        {$profile_item_index_content}
    </div>

</div>


<div class="mobile"> 


    <div class="title">
       
        <h1>Producers</h1><br>
        
    </div>
    <br>
    
    
    
    
    
<!-------
<div class ="col2 last" >
    
    
    <div class="desk" style="text-align: center;" >
 <p class="desk" style="    color: rgba(103, 98, 98, 0.6);
    font-style: italic;">Sponsored</p> 
    
    <p><a href="https://itembo.com/itemboservices"><img src="https://itembo.com/image/img/module/jrCore/beat_shop.jpg?r=412173812" alt="itembo Services" title="itembo services" style="margin: 0px;" width="300" height="750" border="1"></a></p>
    
    
    
   </div>
   </div>
    ----->

</section>


Ok, so I added the code you sent to this profile_item_idex.tpl page but page did not load on the browser.
updated by @musamensa: 08/16/20 06:42:49AM
alt=
duke
@musamensa
4 years ago
253 posts
...so I am thinking that I have to toggle between the profile_sidebar.tpl and
 
{$profile_item_index_content}
in someway to achieve this ?
douglas
@douglas
4 years ago
2,791 posts
Sorry, I don't see that code in AduioPro's profile_index.tpl, which skin is this for?

Thanks!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
duke
@musamensa
4 years ago
253 posts
it's for the AudioPro skin but I did some customizations. please what .tpl file is loaded when you view a profile? profile_index.tpl or profile_item_index.tpl ? I noticed that profiles that have 'Customize profile' enabled use profile_index.tpl and those that don't use profile_item_index.tpl.
michael
@michael
4 years ago
7,715 posts
profile_index.tpl is the default for when the profile loads and no tab is selected.
profile_item_index.tpl is the default for when one of the tabs (eg: audio) is selected. It usually would show a list of audio items
douglas
@douglas
4 years ago
2,791 posts
At the bottom of your profile_index.tpl you should see this code unless you've modified it already:

{jrCore_include template="profile_sidebar.tpl"}

Change that code to this:

{if !jrCore_is_mobile()}
    {jrCore_include template="profile_sidebar.tpl"}
{else}
    {if $_post.option != 'blog' || $_post.module != 'jrAction'}
        {jrCore_include template="profile_sidebar.tpl"}
    {/if}
{/if}

Hope this helps!


--

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

updated by @douglas: 08/17/20 05:38:58AM
alt=
duke
@musamensa
4 years ago
253 posts
michael:
profile_index.tpl is the default for when the profile loads and no tab is selected.
profile_item_index.tpl is the default for when one of the tabs (eg: audio) is selected. It usually would show a list of audio items

Thanks, it makes a lot of sense now.
alt=
duke
@musamensa
4 years ago
253 posts
Thanks, it worked perfectly

Tags