Features / Usability

Features / Usability

Re: Re: Problem with Plugin Button not passing itemId to URL

Thanks, Rick, I alway appreciate your help. I've added an autoincrement field to my tracker and set it to be the itemId type( the field id is 31), and just so I can see the value I added {$f_31} to my output_for_kb.tpl template.

I can see the itemId value displayed in my pretty tracker now but when I add {{$f_31}} to the button plugin like this

Update this Record

The Update Knowledge Base page shows only this message "Missing or incorrect trackerId parameter for the plugin." and the Address bar contains this
http://localhost/tiki-9.0/tiki-index.php?page=Update+Knowledge+Base&itemId=%7B%7B%24f_31%7D%7D so it is picking up the variable — but not the value of the variable.

I know I'm not doing something right — I just can't see what.

United States

You're using {{..}}. Are you using double dynamic variable?

I have several in which I use the single construct, within the button plugin.:

{button href="tiki-index.php?page=Update Knowledge Base&itemId={$f_31}" _text="Update this Record"}

Or, you can do it without the button plugin:

{DIV(type=span,class=button)}[tiki-index.php?page=Update Knowledge Base&itemId={$f_31}|Update this Record]{DIV}


- 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.

Thanks for the suggestion, Rick. I'll try the DIV idea out but after a LOT of trial-and-error (I'm now on version 63 of the Display Knowledge page!) I believe I have found another answer. My page Display Knowledge page now looks like this ( sorry for the formating — I can't find the "Code" button any more and using the CODE pluggin doesn't seem to work, more user-error no doubt, so I had to remove the curly braces in the plugins.)


{BUTTON(href="tiki-index.php?page=Search Knowledge Base",_text="Search Knowledge Base")}{BUTTON
{BUTTON(href="tiki-index.php?page=Update Knowledge Base&itemId=",_text="Update this Record")}{BUTTON

If you look carefully at the last Button plugin you can see that I used double curly braces around the word itemId. So it turns out that this is a system variable.
I think that having the itemId autoincrement field in the Tracker was also a big part of getting this to work.

Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.