So I've gone through the whole
foreach from=$block.customfield.LoadCustomFields.fields key=field item=value
to get custom fields sequentially, but how do I gain non-sequential access to specific fields. I've tried all the array tricks I know but I can't figure out how the smarty array works.
Alternatively, do the TPL files allow you to define local variables to store temporary information.
Finally, is there a way to get the numerical index of the current array value, or is it a fully associative array where the fields can only be accessed by their keys
What i'm getting at is this (pseudocode):
{foreach customfields}
{if $field==xxx}
<tr>
{/if}
<td>{$value|markup}</td>
{if $field==yyy}
<td><a href="zzz.php?n={$theme.item.title}&m={$customfieldvaluex}&p={$customfieldvaluex+1}m={$customfieldvaluex+2}">Order</a></td>
</tr>
{/if}
{/foreach}
Posts: 19
surely this can be done. There has to be ways to access other indici in the CustomFields array, right?
Posts: 19
btw, if anybody cares - Termitenshort worked with me to solve the problem.
Turns out the spaces in the CustomField field names were a problem. Even though the custom fields work fine with spaces, you can't access each field directly if they do have spaces. So if you remove the spaces, you can get to each field with simply
Posts: 14
Valuable info!