visitorLog.tpl retrieving single customvariable value?

Hello,

I figured out following code returns all custom variable names and values in visitorLog.tpl


{foreach from=$action.customVariables item=customVariable key=id}{capture assign=name}customVariableName{$id}{/capture}{capture assign=value}customVariableValue{$id}{/capture}
					- {$customVariable.$name|escape:'html'} = {$customVariable.$value|escape:'html'}
				{/foreach}

Though I couldnt’ make it to return just a single value. How do I retreive e.g. value for customVariable2 only?

thanks & cheers …

I know this is far from ideal, but with zero knowledge of smarty just solved it by additonal condition

if $id == ‘2’ // where 2 equals customvariable I wanted to retreive …


{foreach from=$action.customVariables item=customVariable key=id}{if $id == '2'}{capture assign=value}customVariableValue{$id}{/capture} --> {$customVariable.$value|escape:'html'}{/if}{/foreach}