[Xerte] Re: Creating new template in desktop

Dave Burnett d_b_burnett at hotmail.com
Fri Aug 31 15:24:04 BST 2012


I know I'm coming to his late and I apologize.But when I open the interface and run across the choices it begs for explanation.Anyway to ToolTip the menu choices with a thumbnail description?

Date: Fri, 31 Aug 2012 15:15:07 +0100
From: johnathan.kemp at ntlworld.com
To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Re: Creating new template in desktop

If in Xerte 2.18 you do File / New

You create an ordinary Xerte project without any of the support needed by the page model files. Look in the project folder and all you have is the .rlo file

If instead you create a "pages" type project then all the support needed by the model files is available in your project folder i.e.
the common folder with all the swfs used by the model files
the mapstraction folder for the mapstraction pagethe media folder with the styles.css file in itthe thumbs folder with the thumbnails for each page.
also 

The .rlo file with the scripts to support the model files e.g. support for narration, as well as the setting of the flag to trip the model files to operate in Xerte rather than XOT mode.

An xml file and an xwd file to support the modification of the look and feel of the project.
Yes you could start with File / New and then add in the support for model files manually, but why bother when it is easier to simply create a "pages" type project?

What is missing at the moment is some documentation to support this.
In earlier versions of Xerte the models were always there to be used but most of the same issues would have applied. Lack of common folder so no swfs. Lack of scripts to support shared features such as narration.

The major significant difference came with the move to a universal set of model files, because this introduced the need for the file to detect whether it was in a Xerte or XOT environment. This was originally done by testing for the existence of extXML, which worked without the need for an external flag being set. However this became compromised when I explored the possibility in XOT and pageTemplates of loading an external XML file into the entry frame as a means of loading in layout data, similar to the feature now available in Xerte 2.18 pages projects. Hence the change to an external flag that is set in the script.

Kind regards
Johnathan



On 31 August 2012 14:48, Julian Tenney <Julian.Tenney at nottingham.ac.uk> wrote:


Yes, with the scripts in the entry frame and other stuff needed. If someone tried to add a page, and those scripts weren’t there, they could be added?

 

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Tom Reijnders


Sent: 31 August 2012 14:48
To: Xerte discussion list
Subject: [Xerte] Re: Creating new template in desktop

 Don't know exactly what you mean by 'pages stuff', but yes it sets up a special project.

Oh, that’s right, you need to instantiate the project as a project that uses pages.

 Could it be that if this happens, the pages stuff is added to the project automagically?

 

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Tom Reijnders


Sent: 31 August 2012 14:41
To: Xerte discussion list
Subject: [Xerte] Re: Creating new template in desktop 


1. Pages -> Create new Page Project
2. Choose folder, and open new project

Try the rest. (I had no time to check the hotspots page, but a text page worked fine.)

Op 31-8-2012 15:09, Julian Tenney schreef:Same here.

 

From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett


Sent: 31 August 2012 14:07
To: Xerte list
Subject: [Xerte] Creating new template in desktop 

2.18 as d/l'ed this a.m. 

File New

SavePages > Interactivity >drag/droplabelling

Open the Wizard? > No

dragdroplabel page added as 2nd page (1st page is Untitled and has nothing attached)

Preview (2 blank pages)Double click page and start wizard

Select image

Add 3 hotspotsPreview (2 blank pages)

debug(pageIcon.templateData); // undefined

  

 

 



Date: Thu, 30 Aug 2012 21:41:13 +0100
From: johnathan.kemp at ntlworld.com


To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Re: Creating new template questionI am still using the beta.

 I will down load it and take a look.

 Kind regards

 Johnathan

 On 30 August 2012 21:37, Dave Burnett <d_b_burnett at hotmail.com> wrote:

>The new Xerte 2.18  

 That's why it's problematic.

That's the setup that I just downloaded this a.m.

According to what I was told yesterday, it should be 2.18 

  



Date: Thu, 30 Aug 2012 21:30:50 +0100


From: johnathan.kemp at ntlworld.com
To: xerte at lists.nottingham.ac.uk


Subject: [Xerte] Re: Creating new template questionHello Dave,

 Sorry for the confusion.

 The Page Wizards were never part of the official Xerte download. They were produced as a separate zip file that when unzipped created a set of folders, each of which contained several .xcp files. Each single .xcp file defined the xwd, rlm and xml file for a page. It is this separate add on to Xerte that has been retired.

 The new Xerte 2.18 includes for each page type a separate xwd that defines the form, and an rlm file that defines the model for each page. Look in 

 Xerte \ pages \ models

                      \ wizards \ en-GB 

 to find them.

 Each of the pages in the original page wizards download had its own xml file that was already populated with data. Its data was enclosed in 

<learningObject> </learningObject> tags

 so the top level node that existed when Xerte converted the xml to an object was "learningObject"

 All the pages in Xerte 2.18 generate xml with their data enclosed in <pageWizard> tags so the top level node in the object is "pageWizard"

 It really doesn't matter what the top level node is called as long as you are consistent. I think when we moved to implement the individual page templates in Xerte 2.18 I changed from using "learningObject" as that is what is used in pageTemplates xml files as a wrapper to contain the data for a whole Xerte project and not just for one page.

 The important thing to realise is that in a pageTemplates (project wide template ) project or a XOT project there is only a single xml file that contains the data for all of the pages. Whereas in a Xerte pages project each page has its own xml data file (apologies if I am teaching you to suck eggs :-)

 Since the intention is to create a model file that can be used in either Xerte or XOT this raises a problem since the structure of the xml file differs between the single page for Xerte individual page and the one file containing the data for all the pages in a XOT or pageTemplates type of project.

 The opening section of the rlm file

 pageIcon = icon.parentNode.clip();

 if (rootIcon.projMode == "dev"){ 


// Page Wizard
pageIcon.templateData = pageIcon.extXML.toObject();
pageIcon.templateData = pageIcon.templateData.pageWizard[0];
} else {
// Toolkits
myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]);


pageIcon.templateData = myXML.toObject();

} 

resolves this and the line highlighted in yellow effectively strips out the reference to pageWizard so that the rest of the model file can refer to pageIcon.templateData and thus be identical for both environments.

 The original Page Wizard files were only designed to work in the desktop Xerte individual page environment so this was not an issue at the time.

 What is now significant is that Tom has written some php code that will parse through all the xwd files in a xerte install to generate a new template.xwd file that can be used in XOT. Remember XOT does not use individual xwd files but instead uses a single file containing the forms for all the pages. I think this parser looks for the <wizard> and <pageWizard> tags that are contained in the individual xwd files to help identify the relevant sections to include when building the template.xwd file.

 You can develop new pages by creating a project using File / New

 However if you do so and then try using any of the existing model files you will run into a number of issues such as missing swf files, rootIcon.projMode will not be defined and some supporting code that is shared by several of the models e.g. narration support will not exist in your project.

 Alternatively if you start your project using Pages / Create New Page Project then all the items needed to support the models will be included in your project. So it kind of makes sense to use the Page Project option and then to create a new page by starting from an existing one. If you pick a page that has some of the features you want in your page you can add extra fields to the xwd form run the form and examine the xml file to see that it is being populated correctly. Then you can modify the page's structure to consume the new data.

 By keeping to the standard structures used in the new pages you will ensure that your new pages can be transferred to XOT if you wish to do that.

 I hope that is a bit clearer.

 KInd regards

 Johnathan

  

On 30 August 2012 18:59, Dave Burnett <d_b_burnett at hotmail.com> wrote:

 

Thanks Johnathan. 

I just opened a new file in Xerte and then inserted the drag/drop .rlm I am trying to alter.

 so I added the templateData path in the LO and then used just   

 

  pageIcon.templateData = extXML.toObject();  pageIcon.templateData = pageIcon.templateData.learningObject[0];


to get the data loaded.

 Why am I using learningObject and you are using pageWizard

I thought you had deprecated pageWizard.

  

 



Date: Thu, 30 Aug 2012 18:25:56 +0100
From: johnathan.kemp at ntlworld.com


To: xerte at lists.nottingham.ac.uk
Subject: [Xerte] Re: Creating new template question

 You are using an old model file probably from a page wizard.

 The new model files use

 pageIcon = icon.parentNode.clip();



if (rootIcon.projMode == "dev"){ 
// Page Wizard
pageIcon.templateData = pageIcon.extXML.toObject();
pageIcon.templateData = pageIcon.templateData.pageWizard[0];
} else {
// Toolkits
myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]);


pageIcon.templateData = myXML.toObject();

} 

A setup script off the entryFrame of a "pages" type project sets 

 rootIcon.projMode = "dev";

 This ensures the model file behaves correctly for a desktop Xerte project. This value is not set in XOT projects which enables the same model file to be used in both Xerte and XOT. The idea being that people will be able to develop new page types in Xerte and then transfer them to a XOT environment.

 Refer back to my other reply for an idea of how I approach the creation of a new page. Even if you don't follow the same steps it should guide you as to what else you need to do.

 Kind regards

 Johnathan

 On 30 August 2012 15:42, Dave Burnett <d_b_burnett at hotmail.com> wrote:

 

I'm playing with the new 2.18 version (Thanks to Johnathan and all!).

 I've made a new template and can load it onto the flowline.

 Now I want to alter the underlying model and to do that I need to get test data into it.

 So I open a new file and insert the .rlm from the models file.

 In the first script icon of the .rlm we have:

 if (extXML == undefined){

  // Page Wizard

  pageIcon.templateData = pageIcon.extXML.toObject();  pageIcon.templateData = pageIcon.templateData.pageWizard[0];

 

Am I missing something, e.g. if extXML is undefined, won't pageIcon.extXML also be undefined?

 What I need to do obviously is get data into pageIcon.templateData in order to get the model to function.

 Cheers,

Dave
 
  

  

  


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. 


_______________________________________________


Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte



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.







_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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.


_______________________________________________


Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte



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.







_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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.


_______________________________________________


Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte



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.







_______________________________________________ Xerte mailing list Xerte at lists.nottingham.ac.uk http://lists.nottingham.ac.uk/mailman/listinfo/xerte 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.





_______________________________________________Xerte mailing list

Xerte at lists.nottingham.ac.ukhttp://lists.nottingham.ac.uk/mailman/listinfo/xerte

 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 attachmentmay still contain software viruses which could damage your computer system:

you are advised to perform your own checks. Email communications with theUniversity of Nottingham may be monitored as permitted by UK legislation.

 


-- -- Tom ReijndersTOR InformaticaChopinlaan 275242HM RosmalenTel: 073 5226191Fax: 073 5226196 


_______________________________________________

Xerte mailing listXerte at lists.nottingham.ac.ukhttp://lists.nottingham.ac.uk/mailman/listinfo/xerte
 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 attachmentmay still contain software viruses which could damage your computer system:

you are advised to perform your own checks. Email communications with theUniversity of Nottingham may be monitored as permitted by UK legislation.

 

-- -- Tom ReijndersTOR InformaticaChopinlaan 275242HM RosmalenTel: 073 5226191

Fax: 073 5226196 
_______________________________________________

Xerte mailing list

Xerte at lists.nottingham.ac.uk

http://lists.nottingham.ac.uk/mailman/listinfo/xerte



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.







_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte

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/attachments/20120831/28083f6d/attachment-0001.html>


More information about the Xerte mailing list