Categories > TinyButStrong general >

if some function([var.value])

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Preben Holm
Date: 2006-08-03
Time: 13:01

if some function([var.value])

Hi there

I'm trying to do something like this:
[onload;if [var._SESSION.user.hasSupplyToken('[var.product.supplyToken]')] = 1; then '<br /><a
href="product.php?supplynotes;id=[var.product.id]">Supply notes</a>']

this code should evaluate the user->hasSupplyToken() of the products supplyToken.

This however results in the error:
TinyButStrong Error in field [var._SESSION.user.hasSupplyToken('[var.product.supplyToken]')...] : item hasSupplyToken('[var' is neither a method nor a property in the class 'User'. This message can be cancelled using parameter 'noerr'.
By: Skrol29
Date: 2006-08-03
Time: 16:40

Re: if some function([var.value])

Hello,

You cannot embed var fields into TBS field's name.
Businness logic and Design logic always have a common point to share, but why cannot you prepare the (complicated) criteria in the PHP side ?

$token = $_SESSION['user']->hasSupplyToken($product.supplyToken);