Showing paging status with Paged Queries

You need to select an HTML tag to be able to add a dynamic attribute.

No sure what you mean by selecting the HTML tag (i know what HTML tags are). Do you mean the

<div class="contentArea"></div> 

?

Well I mean, in order to apply show or hide dynamic attribute you need to select an HTML tag …
Select the tag you want to hide on the last page and apply the show or hide attribute to it.

So the only way to show or hide content in Wappler is if its wrap by itself in html tags ?

It would save a lot of time if you could post a reply with a sample of doing what I’m looking to do.

Thanks

Well yes of course. How would you hide content otherwise, if it’s not wrapped in HTML tags? Where would you apply the dynamic HTML attributes to?

You can learn more about HTML attributes, how they work and where they are applied on the following link:
https://www.w3schools.com/html/html_attributes.asp

That’s just fundamental HTML knowledge.

  • please drop the fundamental knowledge crap I’m trying to learn Wappler and the snide remarks piss me off to no end and make me want to cancel my subscription. Thank you

Here is how I would do it in Dreamweaver with php and it was not dependent on HTML

 <?php // Show IF Conditional 
if (@$row_rsreunionlist['pay_standard_fee'] != 0) {
?>												   
	<?php echo $row_rsreunionlist['class_contact']; ?>
												   
<?php // else Conditional region21} else { ?>
												   
<?php echo $row_rsreunionlist['class_contact'], 15; ?> 
												   
<? // endif Conditional region21 ?>

Actually if you just use the bootstrap 4 paging generator, it will add all the paging functions you need.

1 Like

You don’t mix serverside code with clientside code when using JavaScript frameworks such as App Connect (or vue.js, angular, react etc
).
There is a separation between these. Your page only consists of HTML/JS code while the PHP runs only on the back end.
The example of old, outdated and deprecated DW serverside tools have nothing to do with how the modern websites function.

I provided the link so you can check what HTML attributes are and how do you use them, in case you don’t know.

This has nothing to do with the Page it self it has to do with the display of record numbers and totals which can be done just trying to handle the last page which displays NaN as the last record displaying

Can you see the problem on this page - which displays totals as you want them, as far as I understand? If so, perhaps there is something I need to fix.

Yes Tom I’m trying to do like you did here

records found: 5782 (showing 5781 to 5782)

right now on my page it shows like this

3400 - NaN of 3420 Total Records

If you look at the source code you should be able to replicate what I have done.

Maybe you didn’t read my comment and are trying to reinvent the wheel, but you can use the generated paging expressions and customize them

Tom I looked and it seems your code is based on searching

          <p dmx-show="sc_search.data.qry_stock.total > 0">records found: {{sc_search.data.qry_stock.total}} <span dmx-hide="sc_search.data.qry_stock.limit >= sc_search.data.qry_stock.total">(showing {{sc_search.data.qry_stock.offset + 1}} to 
            {{sc_search.data.qry_stock.offset + (sc_search.data.qry_stock.page.current != sc_search.data.qry_stock.page.total?sc_search.data.qry_stock.limit:(sc_search.data.qry_stock.total % query.offset))}})</span></p>

And my code is just based on the the records shown as opposed to search for

<p>{{paging.data.query1.offset+1}} - {{paging.data.query1.page.current != paging.data.query1.page.total?paging.data.query1.offset + paging.data.query1.limit:paging.data.query1.offset +(paging.data.query1.total % query.offset)}} of

                        {{paging.data.query1.total}} Total Records</p>

George here is my code

{{paging.data.query1.offset+1}} - {{paging.data.query1.page.current != paging.data.query1.page.total?paging.data.query1.offset + paging.data.query1.limit:paging.data.query1.offset +(paging.data.query1.total % query.offset)}} of {{paging.data.query1.total}} Total Records

Which on every page but the last page displays correctly

07

Except on the last page which looks like this

30

I want NaN to actually say in this case 3240

so it would in fact say 3401 - 3420 of 3420 Total Records

If sample code could be shown on how this is done that would save me and others I assume a lot of time and in fact make it easier to understand and learn.

I don’t think this is relevant. The code related to displaying search results totals isn’t dependent on the type of query.

I forgot to mention - there are several examples of showing and hiding elements which you asked about.

Tom where are these examples for showing and hiding?

You can learn how to show or hide HTML Elements in the docs i provided:

In the source code of the page I linked to. There are about 10 examples, eg:

Trying to follow this and I get down to this section of the instructions and nothing looks like the instructions showing

When I right click all a get is a pop up Speech link

55