Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
childlink export question (Read 7183 times)
Steve Ersinghaus
Full Member
*
Offline



Posts: 14

childlink export question
Sep 25th, 2011, 5:06pm
 
Gentlepeople,

Is there a way to adjust the ^childlink()^ export code so that upon export the lists don't use the hierarchical ul li html code.  I'd like to play with some random sorts of the lists using javascript.  Or is there an alternative, such as sorting the lis themselves, so I guess this is a javascript question also/maybe?
Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: childlink export question
Reply #1 - Sep 25th, 2011, 5:23pm
 
^childlink always exports an unordered list of links.

But you say you'd like to use javascript to manipulate the links. That's easy enough, especially using jquery or prototype.js. Just walk the DOM to locate the <ul> that contains your child links, and replace it with whatever you like.
Back to top
 
 
WWW   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: childlink export question
Reply #2 - Sep 25th, 2011, 5:44pm
 
Yes, just use the whole syntax (4 arguments) but for instance leave them all empty - e.g. ^childLinks("","","","")^.

You can't sort ^childLinks^. Instead you'd need to use action code to build a list of linked items, sort that and then export.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Steve Ersinghaus
Full Member
*
Offline



Posts: 14

Re: childlink export question
Reply #3 - Sep 26th, 2011, 9:30am
 
The plan is to place the childlinks into a space beneath note content and provide a random or even slightly animated set of links to other "stories" or "poems" in the web compendium.  It's actually the same set up as this, just with different DOM manipulation: http://steveersinghaus.com/auniverse/poems/seconds.html  

It should be a nice iPad experiment.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: childlink export question
Reply #4 - Sep 26th, 2011, 10:40am
 
Quote:
The plan is to place the childlinks into a space beneath note content and provide a random or even slightly animated set of links to other "stories" or "poems" in the web compendium.

Are the latter children of the current note? Otherwise, I'm not sure it's ^childLinks^ that you need to make the links you describe.

If you do use a ul/li output structure for the links, give the list tag (<ul>) an id attribute to make it easier to find and manipulate in the JavaScript you're using.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Steve Ersinghaus
Full Member
*
Offline



Posts: 14

Re: childlink export question
Reply #5 - Sep 27th, 2011, 11:43am
 
The structure goes root document and a container called fictions inside which exist the notes that contain stories.  Everything works at the moment.  I haven't played with latest TBX export codes, though.  I imagine I could grab children or siblings.
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: childlink export question
Reply #6 - Sep 27th, 2011, 11:55am
 
TB offers a number of link set generation export codes as listed here. ^siblings^ might be one you want to look at.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print