English > Support
[SOLVED] Issue with maxvalues on Export
(1/1)
kmickeletto:
I am trying to limit how many actors are included during an export to XML. I have read and everything points to what I have tried but it still doesn't seem to work. Can anyone point me in the right direction?
--- Code: ---<actors>{%value=actors template="actors.ptm" maxvalues="3"}</actors>
--- End code ---
I have also tried...
--- Code: ---<actors>{%value=actors maxvalues="3"}</actors>
--- End code ---
Currently my actors.ptm file looks like this...
--- Code: ---%HEAD%<actor>%HEAD%
<name>{%param=name}</name>
%FOOT%</actor>%FOOT%
--- End code ---
kmickeletto:
I was able to figure it out...
--- Code: ---<actors>{%value=actors template="pages\actors.ptm" maxvalues="3" params="full"}</actors>
--- End code ---
actors.ptm
--- Code: ---%HEAD%%HEAD%
{%param=name},
%FOOT%%FOOT%
--- End code ---
I get an extra comma at the end of the string of actors, but I guess I can live with it. Anyone know how to trim the last one?
svenne:
Hi kmickeletto!
Here's the (or a) trick to trim the last comma:
--- Code: ---<actors>{#StringReplace '{%value=actors template="pages\actors.ptm" maxvalues="3" params="full"}' ', [ENDLIST]' ''}</actors>
--- End code ---
actors.ptm (all in one line):
--- Code: ---%HEAD%%HEAD%{%param=name}, %FOOT%[ENDLIST]%FOOT%
--- End code ---
Navigation
[0] Message Index
Go to full version