Personal Video Database
English => Support => Topic started by: kmickeletto on October 07, 2010, 01:35:25 am
-
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?
<actors>{%value=actors template="actors.ptm" maxvalues="3"}</actors>
I have also tried...
<actors>{%value=actors maxvalues="3"}</actors>
Currently my actors.ptm file looks like this...
%HEAD%<actor>%HEAD%
<name>{%param=name}</name>
%FOOT%</actor>%FOOT%
-
I was able to figure it out...
<actors>{%value=actors template="pages\actors.ptm" maxvalues="3" params="full"}</actors>
actors.ptm
%HEAD%%HEAD%
{%param=name},
%FOOT%%FOOT%
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?
-
Hi kmickeletto!
Here's the (or a) trick to trim the last comma:
<actors>{#StringReplace '{%value=actors template="pages\actors.ptm" maxvalues="3" params="full"}' ', [ENDLIST]' ''}</actors>
actors.ptm (all in one line):
%HEAD%%HEAD%{%param=name}, %FOOT%[ENDLIST]%FOOT%