[Xerte-dev] Re: text link to first and last pages

Ron Mitchell ronm at mitchellmedia.co.uk
Fri Dec 20 15:04:58 GMT 2013


Hi John

that's great thanks for both responses. 

It did occur to me that including first, last, prev, next in the page links
list would be very useful at some point but for my purposes right now I just
need a way to achieve these first and last links with minimal editing and
largely because I need to pass on text files to a colleague to do the same.
Changing a single number for last page isn't a problem either so <a
href="asfunction:_level0.engine.rootIcon.pageLink,1">First page</a> and <a
href="asfunction:_level0.engine.rootIcon.pageLink,4">Last page</a> is fine
for now.

 

I think that -1 addition would be useful at some point as would prev and
next.

 

Cheers - have a great Xmas!

Ron

 

From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Smith, John
Sent: 20 December 2013 14:31
To: For Xerte technical developers
Subject: [Xerte-dev] Re: text link to first and last pages

 

Hmm on second thought, we renamed it. it is navigateToPage(force, pageInfo)
where force = true/false and pageInfo = type (page/PageID/LinkID), ID (or
page number)

 

So    x_navigateToPage(false, {type:'page', ID: '3'});    or
x_navigateToPage(false, {type:'LinkID', ID: 'PG123456789'});    

 

>From the xml though this will be automatically 'replaced' with the
equivalent call above

 

<a href="asfunction:_level0.engine.rootIcon.pageLink,3">Page 3</a>

 

This is where we could easily make a change to interpret <a
href="asfunction:_level0.engine.rootIcon.pageLink,-1">Last Page</a>

 

Regards,

 

John Smith

Learning Technologist

School of Health & Life Sciences

Glasgow Caledonian University

 

From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Smith, John
Sent: Friday, December 20, 2013 2:01 PM
To: For Xerte technical developers
Subject: [Xerte-dev] Re: text link to first and last pages

 

HI Ron,

 

Yes, as Julian says, you can use that x_gotopage(n) function from a script
but that will only work in the HTML5 player, the asfunction: code is native
ActionScript code that only works in the Flash engine.

 

The asfunction code that is generated by the PageLink context menu in the
wizard however is replaced with a javascript call to that x_gotopage(n)
function when the page is built.

 

You can use PageID, LinkID, or page number in the code that it produces -
can't quite remember the exact format just now - but if you use the pagelink
and then replace the PageID in the code with 1 then the link should link to
page 1.

 

Last page is harder, there is no way currently to do that without using a
script to get the last page from the xenith code and then manually going to
that page.

 

I could however very easily add in -ve page linking. so -1 would be the last
page and -2 would be the second from last. if you think that that would be
useful. alternatively just having keywords FIRST, LAST, etc. but that could
get messy and isn't very internationalized.

 

Regards,

 

John Smith

Learning Technologist

School of Health & Life Sciences

Glasgow Caledonian University

 

From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: Friday, December 20, 2013 1:00 PM
To: 'For Xerte technical developers'
Subject: [Xerte-dev] Re: text link to first and last pages

 

Cheers, had to park this for now but will have a look.

 

From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 20 December 2013 12:32
To: For Xerte technical developers
Subject: [Xerte-dev] Re: text link to first and last pages

 

In xenith.js is a function x_gotopage(n)

 

Any good?

 

From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 20 December 2013 11:53
To: 'For Xerte technical developers'
Subject: [Xerte-dev] text link to first and last pages

 

Hi all

quick question that I've been trying to remind myself about but failing :-(

With all the page linking stuff we now have I'm not sure if we still have
the following that works in html5 player:

 

I need to be able to add an additional page with the same wording to a whole
number of LO's which contains a text link to the first page and separately
the last page. Ideally I want to be able to copy and paste the text content
including these links without having to edit so rather than linkID's I want
to use links that always go to first page and always go to last page even if
the number of pages between change. I know the connector pages have the
ability to add relative links but do we still have an asfunction type
solution that will work on any page type?

 

Cheers (& season's greetings)

Ron

 

This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it.   Please do not
use, copy or disclose the information contained in this message or in any
attachment.  Any views or opinions expressed by the author of this email do
not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system,
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

 

 

This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it.   Please do not
use, copy or disclose the information contained in this message or in any
attachment.  Any views or opinions expressed by the author of this email do
not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system,
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

 


Glasgow Caledonian University is a registered Scottish charity, number
SC021474

Winner: Times Higher Education's Widening Participation Initiative of the
Year 2009 and Herald Society's Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en
.html

Winner: Times Higher Education's Outstanding Support for Early Career
Researchers of the Year 2010, GCU as a lead with Universities Scotland
partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,e
n.html

This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it.   Please do not
use, copy or disclose the information contained in this message or in any
attachment.  Any views or opinions expressed by the author of this email do
not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system,
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

 


Glasgow Caledonian University is a registered Scottish charity, number
SC021474

Winner: Times Higher Education's Widening Participation Initiative of the
Year 2009 and Herald Society's Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en
.html

Winner: Times Higher Education's Outstanding Support for Early Career
Researchers of the Year 2010, GCU as a lead with Universities Scotland
partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,e
n.html

This message and any attachment are intended solely for the addressee and
may contain confidential information. If you have received this message in
error, please send it back to me, and immediately delete it.   Please do not
use, copy or disclose the information contained in this message or in any
attachment.  Any views or opinions expressed by the author of this email do
not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system,
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20131220/8353d111/attachment-0001.html>


More information about the Xerte-dev mailing list