Hi,
I'm developing a new module to link YouTube videos in Gallery, and have a problem accessing object methods from within my template. I've copied code from the ItemAddFromWeb and ItemAddLinkItem modules. In the template, I've changed this line (from ItemAddFromWeb):
<input type="checkbox" id="cb_{$idCount}"
name="{g->formVar var="form[webPageUrls][`$url.url`]"}"/>
to:
<input type="checkbox" id="cb_{$idCount}"
name="{g->formVar var="form[videoIds][`$videoEntry->getVideoId()`]"}"/>
I'd like to call the object method on the $videoEntry object, but this is what I'm getting in my html:
<input type="checkbox" id="cb_1"
name="g2_form[videoIds][`->getVideoId()`]"/>
I've tried with and without the backquotes, with a full stop and the method accessor. I'm relatively new to Gallery development, and smarty tags as well, so I'm not sure which system my question relates to.
Can anyone explain how to access the method?
Thanks,
[b]Bernie
Posts: 8339
So this module won't work for you?
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 3
Ok, [i]I figured it out... just needed to use the cat modifier:
<input type="checkbox" id="cb_{$idCount}"
name="{g->formVar var="form[videoIds]["|cat:$videoEntry->getVideoId()|cat:"]"}"/>
Cheers,
Bernie
Posts: 3
@suprsidr: Almost, but I'd like something that works cleaner than jamming HTML into the description field, but thanks for the suggestion.
Cheers,
Bernie