@neilw - thank you SOOO much - I apologize for being such a noob, but I am a content manager with almost no experience in coding/scripts. Also, as our wiki is for an open source app, we all work as volunteers. So, I really shouldn't be attempting such things
, but everyone loves our TSTables so much and now I am screwed because they keep asking me to do them!!
Your solution worked very well with the following code:
Code:
var x = wiki.api(page.api);
var data = [ wiki.getpage(path) foreach var path in xml.list(x,"//inbound//path") ];
TSTable {
options: { pager:true, zebra:true, width:"80%", nodata:"No changes yet for this control" },
columns: [
{ key:"(web.link($.uri,$.title))", title:"Change" },
{ key:"(date.format($.revisions[0].date,'yyyy/MM/dd'))", title:"Date", width:"20%", initial:1 },
{ key:"(var t=$.tags; foreach(var x in t) { var s = string.split(x['name'], ':'); if(s != null && s[0] == 'rel'){ s[1] .. ' '} })", title:"Release"}
],
data: data
}
My only problem now is that I need to constrain the inbound links to subpages of a specific page. How do I do that? If you can even point me in the right direction (link to an relevant MT Wiki page) I can probably figure it out. I assume I want to specify a specific path for "var data = [ wiki.getpage(path) foreach var path in xml.list(x,"//inbound//path") ];" so I tried to add a 'var path = ' statement but either that is the wrong approach or I didn't get the syntax right (as usual!)
Here are some comments on your guidance/questions so you understand where I get lost.

Originally Posted by
neilw
You can now pass that data straight to TSTable. Your last two columns should work fine as-is, but you'll need to re-write the first, keeping in mind that $ is a page variable.
I did understand that, you can see the above example what I normally use. I was just trying anything I could without understanding what I was doing.

Originally Posted by
neilw
Foreach syntax can be a bit complex but it is consistent. You've read
this article, right?
Several times
my comprehension has increased to almost 10% now. I am sure as I learn more, it will increase further.

Originally Posted by
neilw
Now let's look at the code you posted to see where you went astray:
1) Putting TSTable *inside* your foreach loop. Unless your goal is to generate a bunch of tables, this is not going to work out well.

That was just dumb - I missed closing the foreach statement DUH!

Originally Posted by
neilw
2) Passing the wrong kind of data to TSTable. Xml.text() just outputs a single text string. You want to pass a list of structures to TSTable. Think about what data you want to give to TSTable, and work backwards from there, as I did at the top of this post.
I was lost trying to figure out the data structures. I normally use wiki.getsearch as your tutorial examples all do. And search I understand! It never occurred to me I could define var data and use that in the data structure. DUH Now it seems obvious and stupid that I did not think of it. Is that mentioned in the tutorial? I guess it is a somewhat 'advanced' option, which most knowledgeable Dekiscript users would grasp anyway.

Originally Posted by
neilw
3) In your TSTable columns, your first column used eval code but doesn't reference $, pretty much guaranteeing bad results. In general, your first column definition doesn't seem to follow the same ground rules as the last two (which are clearly designed to operate on page variables.)
Yep as I said above, I do understand the column definitions/keys, I was just trying anything in desperation to see if I could figure out where to process the inbound links.