no the if statement everything working yet the if statements as well as the count variable I have registered it yet is not working
waiting for your solution
many thanks in advance
--------------- Added [DATE]1371496940[/DATE] at [TIME]1371496940[/TIME] ---------------
Hey Lynne,
It retrieves the albums yet if I add the if statements
and set the variable of data_block
as you said
Quote:
You would need to set that variable first:
$this->block_data['albumbits2'] = $albumbits2;
|
add the above code in php as i attached in the privous post
the if statement is not working once I add it around the albums and buttons
it displays that there is no album
the template as follow
PHP Code:
<div id="view-photos" class="<vb:if condition="$selected_tab == 'photos'">selected_view_section<vb:else />view_section</vb:if><vb:if condition="$userinfo['userid'] != $bbuserinfo['userid']"> vm_other_prof</vb:if>">
<div class="blocksubhead subsectionhead userprof_headers userprof_headers_border">
<h4 class="subsectionhead-understate">User albums</h4>
</div>
<div class="albums">
<h5 class="blocksubhead smaller">
<a class="textcontrol" href="album.php?{vb:raw session.sessionurl}do=addalbum">{vb:rawphrase add_album}</a>
<span class="albums_total">{vb:raw albumcount}</span> {vb:rawphrase albums}
</h5>
<div class="blockbody userprof_content userprof_content_border">
<vb:if condition="$block_data['albumbits2']">
<ul class="albumslist blockrow image_link_list">
{vb:raw albumbits2}
</ul>
<vb:else />
<div class="blockrow member_blockrow">
{vb:rawphrase you_have_not_created_any_albums}
</div>
</vb:if>
</div>
</div>
</div>
you can see the if statements in this bet
PHP Code:
<vb:if condition="$block_data['albumbits2']">
<ul class="albumslist blockrow image_link_list">
{vb:raw albumbits2}
</ul>
<vb:else />
<div class="blockrow member_blockrow">
{vb:rawphrase you_have_not_created_any_albums}
</div>
</vb:if>
it goes to else which is there is no album when there is
I have tried all what you have suggested me
yet is not working??