I want to embed a simple slideshow to my template, and I want to use subform to make easier to change the image.
This is the code I use to call the child xml file
<field name="slideshow_items" type="subform" formsource="templates/jomlamaster/admin/subform/slideshow.xml" min="1" max="4" multiple="true" layout="joomla.form.field.subform.repeatable-table" groupByFieldset="true" label="Subform Field" description="Subform Field Description" />
and this is the content of slideshow.xml :
<?xml version="1.0" encoding="UTF-8"?>
<form>
<fieldset name="fieldset" label="Slideshow">
<field name="slideshow_img" type="media" directory="" label="Slideshow item" description="Choose an image slideshow"/>
<field name="slideshow_title" type="text" class="inputbox" label="Slideshow text" size="40" />
</fieldset>
</form>
This is what I get when print_r($slideshow_items);
stdClass Object
(
[slideshow_items0] => stdClass Object
(
[slideshow_img] => images/slideshow/img0.jpg
[slideshow_text] => Title 1
)
[slideshow_items1] => stdClass Object
(
[slideshow_img] => images/slideshow/img1.jpg
[slideshow_text] => Title 2
)
[slideshow_items2] => stdClass Object
(
[slideshow_img] => images/slideshow/img2.jpg
[slideshow_text] => Title 3
)
[slideshow_items3] => stdClass Object
(
[slideshow_img] => images/slideshow/img3.jpg
[slideshow_text] => Title 4
)
)
How can I parse the values above so I can use them for slideshow?
Thanks!