Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

setFieldLabel in a view

$
0
0
Hello,

i need to change the labels of a field dynamicly. No problem with a single table as described in the manual on
https://xlinesoft.com/phprunner/docs/setfieldlabel.htm.

I don't wanto to use $dal because it is deprecated (see manual).

Setting new labels with
Labels::setFieldLabel($table, $field, $label, $language) 

in AfterAppInit, AfterTableInit, BeforeProcess events works pretty well.

Example:
SELECT
	products_name,
	products_description
FROM products_description 

Works excellent:
Labels::setFieldLabel("products_description", "products_description", "New Description");


But how does this work in views?

Example:
SELECT
products.products_id,
products.products_image,
products_description.products_name,
products_description.products_description
FROM products
INNER JOIN products_description ON products.products_id = products_description.products_id


I tried:
Labels::setFieldLabel("products_description", "products_description", "New Description");

==> no change of label

Next i tried setting
$table = products_with_description 

(with "products_with_description" as name of my view)
==> no change of label

So what is the value i have to use in $table - or is this the wrong way to change labels in views?

Viewing all articles
Browse latest Browse all 2586

Trending Articles