* Graham * Keyarn The example is right there !
for the basics of what the original example is doing that's it
The link is like <a href="?inc=this_file#">click me</a> and then it includes the file further down the page
with <xt:include file="/includes/{_$inc|default_file}"/>
when the page loads 'default_file' is included
when the button is clicked 'this_file' is included

For the 'cycle' version the link <a href="?inc=this_file#">click me</a> is not on the page it's in the file being included
just change the value of $inc in the link in each file so that the next file can be included all you need on the actual page is the include
<xt:include file="/includes/{_$inc|default_file}"/>
so that the 'default-file' is included when the page loads

All the variable names and file names are arbitrary and just there to show the principal

the only other thing the is 'anchor navigation'
give any element a unique for example id="id_name"
then in the link add #id-name to the end of the url and the page scrolls to that element when the link is clicked
thats part of basic html
2017-02-17 10:46 (edited 2017-02-17 11:06 by Graham ) · (0)

Online: Guests: 1