Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Documentation and Tutorials >> One-stop Web/Local export toggle for aTbRef
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1362063380

Message started by Mark Anderson on Feb 28th, 2013, 9:56am

Title: One-stop Web/Local export toggle for aTbRef
Post by Mark Anderson on Feb 28th, 2013, 9:56am

Thinking through how other people might make sense of my TBX for aTBRef, I've introduced some improvements under the hood (already uploaded).

The changes don't affect the live web-site but rather how export works in a context where the user wants a local HTML copy that won't cal out to the web when loading pages (note: some content pages may contain links out of aTbRef but which only load if clicked by the viewer).

The end section of the root outline changes slightly:



All the notes whose export is altered by this new mechanism now lie after the last separator.  opening the 'EXPORT SET UP' note and toggling a boolean key attribute, gives this:



Now, none of these web-only notes are exported, $AutoFetch is disabled in the Checkers, the feed agents are turned off and some web-related includes in the main HTML export template are turned off (e.g. google Analytics code). To make it clear notes being turned of are struck through.

Toggle the boolean back and everything turns back on. not of this stops you tinkering as you desire for learning techniques or simply copying code for your own projects. However, I do think it makes it easier for a new user to 'just' run out a local copy of the HTML on their Mac without their LAN administrator complaining they're trying to call out to the web (some folk work in locked-down places - not all of use have free access).

Starting out with some gnarly code, this resolved to a code note for the (big) conditional rule for the 'EXPORT SET UP' note and adding a new prototype for all the notes it calls. The latter make it easy to set $HTMLDontExport for many notes with just one line of code as we set the prototype and the rest happens by inheritance. The $Text of 'EXPORT SET UP' explains more - you must read it in the TBX as it doesn't export.

In addition I've added non-exporting $Text to the other non-exporting notes in the part of the TBX, to give you more of an idea of what is happening.

Some of these non-content special notes need (location) strings specific to my system in order to work. However, these string are stored in key attributes hopefully making it easy for you to copy and re-use the techniques in your own files. If you find any such strings hidden away in code, do please let me know!

Get the TBX.

Title: Re: One-stop Web/Local export toggle for aTbRef
Post by Mark Anderson on Mar 1st, 2013, 1:58am

An HTML walkthrough for the above process is now at: http://shoantel.clarify-it.com/d/fdwqaf

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.