Loading...
 
Features / Usability

Features / Usability


Why can't I create a TrackerList that honors the HREFs in an attached template?

posts: 38 United States

I've got a template that looks like this:

{{$f_20}}
(update: fixed the above, for some reason the URL got stripped out! Ok, apparently it is NOT fixed. I am trying to put the following, it looks okay in preview, but when I actually post it gets removed. I am so frustrated with TikiWiki today!!!)

This is what it is supposed to look like, minus the opening and closing angle brackets, which I can't seem to save:

A HREF="Directory-Project?project={{$f_20}}"
{{$f_20}}
/A

I've put this in a page called "Template-Project".

Now in another page called "Directory-List" I have created this TRACKERLIST:

{TRACKERLIST trackerId="3" showdesc="n" showfieldsdesc="n" showmandatory="n" embedded="y" view="page" wiki="Template-Project"}

But when "Directory-List" comes up, the link is wrong. Instead of the URL looking something like this:

Directory-Project?project=MyProject

It instead comes up like this:

item3?latest=1&from=Directory-List

Which of course is something totally different; it takes me to a tracker viewer page instead of my own report page! I have tried quoting using the ~np~ syntax and it makes no difference! I have also tried not quoting the URL, also with no difference; in fact, after I save, the quotes have been put back in for me. If I go back to see the source of the page, it has encoded the curly brackets to:

project=%7B%7B$f_20%7D%7D

Which isn't what I want either. I entered this all in source mode of the WYSIWYG editor, so I would have expected it wouldn't do any HTML encoding!

posts: 3623 United States

What is your tracker field 20?

If you defined the field as a Title Link, it will be generated with the link tracker view page. 

There are two main ways to override this behavior:

  • If you want to have your tracker information in the template with no formatting (e.g., without the link), you need to use the list_mode=csv parameter (to return the tracker fields as simply plain text). See the Trackerlist doc for details.
  • An alternative is to simply use the template to display an item field in the Tracker's view properties set the default template page (in your example: Template-Project). Tiki will then use this, globally, as the default.

Be sure to review the docs for complete info on working with trackers.

 

HTH,

- Rick  |  My Tiki Blog |  My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.