kaieivindm

Well-Known Member
Is it possible to include a button for refresh page in the same area or same "box/list" as go to top and bottom?
Like this?

upload_2018-5-24_20-34-12.png


Would be a nice addition in the Xenbase framework :)
 

Russ

Pixel Exit Staff
I'll think about adding it in, to be honest a refresh button has never really been requested before.

Pretty easy edit though:

Template: PAGE_CONTAINER
Find:

Code:
        <xf:if is="property('scrollJumpButtons') != 'up'">
            <xf:button href="#footer" class="button--scroll" data-xf-click="scroll-to"><i class="fa fa-arrow-down"></i><span class="u-srOnly">{{ phrase('bottom') }}</span></xf:button>
        </xf:if>

Add below:

Code:
<xf:button href="{$xf.fullUri}" class="button--scroll"><i class="fa fa-refresh"></i><span class="u-srOnly">Refresh</span></xf:button>
 

kaieivindm

Well-Known Member
I got the button to work fine @Russ
upload_2018-5-26_10-14-45.png


But when I click on the refresh button, the page goes to the top again, what do I need to add to just refresh and stay at the bottom og the page?
 

Russ

Pixel Exit Staff
Ganna need some javascript, open : xb_body:

Code:
<script type="text/javascript">
    $('.button--refresh').click(function() {
    location.reload();
});
</script>

Then use this for the button:

Code:
<xf:button class="button--scroll button--refresh"><i class="fa fa-refresh"></i><span class="u-srOnly">{{ phrase('top') }}</span></xf:button>
Should work.
 

kaieivindm

Well-Known Member
Ganna need some javascript, open : xb_body:

Code:
<script type="text/javascript">
    $('.button--refresh').click(function() {
    location.reload();
});
</script>

Then use this for the button:

Code:
<xf:button class="button--scroll button--refresh"><i class="fa fa-refresh"></i><span class="u-srOnly">{{ phrase('top') }}</span></xf:button>
Should work.

When I changed the phrase from 'top' to 'refresh' the above codes worked like a charm! Thanks @Russ

Just what I needed :)
 

kaieivindm

Well-Known Member
If possible, would be awesome to add it as an ACP setting as well, with the scrolling buttons, Refresh page or something.
Pretty sure others needs this as well. :D
 

Russ

Pixel Exit Staff
So I'm going to leave this out of the styles for the time being. For now, I'd suggest applying the page_container edit via a template modification.
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.