3218 Posts in 854 Topics by 813 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 266 Views |
-
Reference subarray data from template (SS 2.4)

28 February 2013 at 3:51am Last edited: 28 February 2013 4:52am
Hi All,
I am quite new to SS, so this might be a silly question!
I have in my template a dataset that, when dumped to screen, looks like this:
Array
(
....[0] => ArrayData Object
........(
............[array:protected] => Array
................(
....................[FirstName] => Agent 1
....................[LastName] => Agent 1
....................[AgentDistributor] => Distributor 1
....................[products] => Array
........................(
............................[0] => Array
................................(
....................................[ProductID] => 11
....................................[ProductName] => Product1
....................................[Quantity] => 15
................................)............................[1] => Array
................................(
....................................[ProductID] => 11
....................................[ProductName] => Product1
....................................[Quantity] => 15
................................)........................)
................)
............[iteratorPos:protected] =>
............[iteratorTotalItems:protected] =>
............[failover:protected] =>
............[customisedObject:protected] =>
............[objCache:ViewableData:private] => Array
................(
................)............[class] => ArrayData
............[extension_instances:protected] => Array
................(
................)........)
....[1] => ArrayData Object
........(
............[array:protected] => Array
................(
....................[FirstName] => Agent 2
............Now, using <% control AgentsResults %> I can loop through the data as expected. However, I am trying to loop through the products sub-array using a nested <? control ?>. Of course this doesn't work, hence I am here.
I found references to <? control Children ?> but this doesn't appear to work!
Could anyone suggest the correct way to go about this, taking into account I am forced to run SS 2.4!
Best regards,
K... -
Re: Reference subarray data from template (SS 2.4)

28 February 2013 at 8:56pm
Products should be wrapped in an ArrayList object so it's iterable. Once you do that, you can do <% control Products %>
-
Re: Reference subarray data from template (SS 2.4)

6 March 2013 at 4:17am
Thanks Willr - thats was enough to get me moving again. All sorted now thanks.
K...
| 266 Views | ||
|
Page:
1
|
Go to Top |


