Loading...
 
Skip to main content

Custom Share Module 0.1dev

Features / Usability

Features / Usability


Nested pretty trackers

posts: 25 United States

Is there a way to nest pretty trackers, such as:

Item 1 of outside trackerlist
-> Inside trackerlist for Item 1 of outside trackerlist
Item 2 of outside trackerlist
-> Inside trackerlist for Item 2 of outside trackerlist
Item 3 of outside trackerlist
-> Inside trackerlist for Item 3 of outside trackerlist

i.e.,
Raider of the Lost Ark
-> Actors
Harrison Ford
Karen Allen
Paul Freeman
Ronald Lacey
John Rhys-Davies
Denholm Elliott
Empire Strikes Back
-> Actors
Mark Hamill
Harrison Ford
Carrie Fisher
Billy Dee Williams
Anthony Daniels
David Prowse
Kenny Baker
Peter Mayhew
Frank Oz
E.T. the Extra-Terrestrial
-> Actors
Dee Wallace
Peter Coyote
Henry Thomas

etc.

My inside tracker, Actors, has an "Item Link" field to the Movie Tracker.

Obviously the inside pretty tracker requires the itemId from the outside pretty tracker, so for the inside trackerlist I've used:

Copy to clipboard
{trackerlist trackerId="9" filterfield="38" filtervalue="{$f_itemID}" wiki="Inside Pretty Tracker wiki page"}


However, I get what seems in essence a compiler error that states:
trackerlist: Pretty tracker reference "$f_itemId" could not be replaced in plugin "trackerlist".

I've tried with and without the quotes and even tried a Transclude as a workaround, but with no luck.


posts: 25 United States

Thanks Rick,

I am viewing the first pretty tracker through a wiki page, so there is no itemId in the URL. Regardless, I tried with ignoreRequestItemId (set both to "y" and "n") but it didn't make any difference.

Here's my actual setup:

1) I have a wiki page for a person. Currently this page only has a trackerlist that shows an infobox based called "Tbox: People" on the view="page" parameter:

Copy to clipboard
{trackerlist trackerId="1" view="page" wiki="Tbox: People"}


The Tbox: People is a pretty tracker.

In the pretty tracker, I can simply put
Copy to clipboard
{$f_itemId}
and the Item ID will correctly show on the page.

However, when I put
Copy to clipboard
{$f_itemId}
inside of the nested pretty tracker to show the person's coaching career, such as:

Copy to clipboard
{trackerlist trackerId="9" filterfield="38" filtervalue="{$f_itemID}" wiki="Tbox: Coaching Career"}


I get the compiler-type error.of:

trackerlist: Pretty tracker reference "$f_itemId" could not be replaced in plugin "trackerlist".

This leads me to belive there's something wrong with the way I've included the
Copy to clipboard
{$f_itemId}
inside of another trackerlist, but I'm not sure.

posts: 25 United States

I should add that when I escape the curly brackets with \{ and \} the error goes away, but it doesn't appear that anything is being shown.

If I remove the filterfield and filter value parameters, then I get the entire list of trackerId 9, which I would expect.


posts: 25 United States

Let me also quickly add that if I hard code the itemId into the outside pretty tracker or the wiki page itself, I get the results I expect.

It appears that only when I reference the {$f_itemId} inside of the trackerlist that I get a problem.

Finally, I've opened up the permissions for the trackers and wiki pages in case you wanted to look at them in closer detail today.

I'll close them off sometime later today, but you can let me know if you have an interest and inclination to look at them later and I can open them up again.


posts: 25 United States

Just a quick update on something else that didn't work:

I turned on the "Wiki Argument Variables" and tried to use , "", "\pageid\}}" , etc., but with no results.

I still believe the issue is in trying to parse inside the trackerlist command.

I open to (hoping for) any additional thoughts.


posts: 25 United States

After playing around with this for a while I've concluded there is a bug that prevents {$f_itemId} from being inserted into trackerlist filtervalue parameter. I can successfully insert {$f_xx} where xx is a field Id, and I can even insert page and the like with double curly brackets, but for some reason {$f_itemId} creates an error.

In fact, none of the following tracker "metadata" can be inserted as a parameter into a trackerlist inside of a pretty tracker:
{$f_created}: created date
{$f_status_input}: status input field
{$f_status}: status (output)
{$f_itemId}: the item id
{$f_lastmodif}: last modified date (this will display unix date, for human readable date look below)
{$itemoff}: the iteration number of each item
{$tr_offset}: the offset of the item, i.e. this is the nth item of the total number of x items

Here are some similar past discussions on this same subject (nested pretty trackers):
https://tiki.org/forumthread61654
https://tiki.org/forumthread60207
http://tikiwiki.1073613.n5.nabble.com/Nested-trackerlists-td18465.html

I'd be willing to look at the code, but I have no idea where to even start . . .

Anyway, I would imagine it's a simple fix but it would open up a world of possibilities with nested pretty trackers inside of wiki pages.

Again, any thoughts would be appreciated.


Upcoming Events

1)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4) 
Tiki birthday
5)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting