Categories > TinyButStrong general >

navdel parameter in paging blocks

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: GypsumBlue
Date: 2004-11-10
Time: 10:02

navdel parameter in paging blocks

Any working examples of the 'navdel' parameter?

I can't work out how to get the 'navdel' parameter to hide the navigation bar when there is only 1 page  of results.

This is the base code from the 'Display by page example', showing the current page.

<td width="16" bgcolor="#C4E1E1"><strong>[nv.page;block=td;currpage]</strong></td>

I modified it like this, by the addition of the navdel tag but it doesnt seem to work:

<td width="16" bgcolor="#C4E1E1"><strong>[nv.page;block=td;currpage; navdel=nv]</strong></td>

Does anybody have any ideas. I can't find any examples in the code of the testimonials or forum applications that use 'navdel' either. I hacked a bit at the tbs_class but still couldn't work out how 'navdel' works.

Thanks in advance.
GB

By: Skrol29
Date: 2004-11-10
Time: 12:58

Re: navdel parameter in paging blocks

Hello,

'navdel' must define a different TBS block that surrouds the block of the navigation bar.
Example:
<tr>
  <td>[nv.page;block=td;navdel=nv0][nv0;block=tr]</td>
  <td><strong>[nv.page;block=td;currpage]</strong></td>
</tr>

I will make the manual more clear.
By: GypsumBluw
Date: 2004-11-10
Time: 14:38

Re: navdel parameter in paging blocks

hello Skroll,

Can't get your solution to work either. Still displays the navigation bar even when there is one page of data only.

My php is actually the same as the example page code except I have increased $pagesize to 19

Actually I had already tried something similar:

[nv0;block=begin]
<table>
  <tr>
    <td>[nv.page;block=td;navdel=nv0]</td>
    <td><strong>[nv.page;block=td;currpage;]</strong></td>
  </tr>
</table>
[nv0;block=end]

but that doesnt work either and leaves the tag as part of the html.
Also tried changing the php:

$TBS->MergeNavigationBar('nv',array('navdel' => 'nv0')$PageNum,$RecCnt,$PageSize) ;

but that did not work either.

*scratches his head*

So long,
GB
By: Skrol29
Date: 2004-11-10
Time: 14:50

Re: navdel parameter in paging blocks

Hi,

Your snippet works fine for me.

Do you have TBS 2.0 or (2.0ce) ?
In your post, MergeNavigationBar misses a comma between arguments, just check that.
Are you sure you've got ($RecCount/$PageSize)<=1 ?
By: GypsumBlue
Date: 2004-11-11
Time: 11:56

Re: navdel parameter in paging blocks

To clarify

the online example can be made to incorporate 'navdel' by substituting the following line:

<td width="16"><a href="[var..script_name]?PageNum=[nv.page;block=td;navsize=4;navpos=centred;navdel=nv0]">[nv.page][nv0;block=table]</a></td>

The navdel parameter must be in the same definition as the block. Makes sense now. Previously I had attempted to add it to [nv.page]. (and then left this out of the example 'cause I thought it didn't matter!!)

Thanks for the help Skroll

GB