[Solved] Extract events from CGCalendar 1.15
Posted: Tue Sep 08, 2015 11:13 pm
Dear forum,
for some time I have been using the CGFeedmaker module in conjunction with the CGCalendar module to generate RSS feeds from upcoming calendar events.
The relevant code from the feed template inside CGFeedmaker reads
It seems that since version 1.15, CGCalendar no longer exports the $events array, as also mentioned in the release notes
1) Is there still a way to get this array directly from CGCalendar? I looked at the exported variables with {get_template_vars}, but was not able to find anything.
2) If not, what is the best way to do it? I guess I could manually modify the CGCalendar templates to fill up such an array structure, but maybe there is a better way..
Best regards,
leoteo
for some time I have been using the CGFeedmaker module in conjunction with the CGCalendar module to generate RSS feeds from upcoming calendar events.
The relevant code from the feed template inside CGFeedmaker reads
Code: Select all
...
{capture assign='kalender'}
{* note that the output from this module call is discarded, but the smarty variables will still exist *}
{cms_module module='CGCalendar' display=upcominglist'}
{/capture}
{foreach from=$events key=key item=event}
...
I have two questions:Note: We now create a separate smarty scope for each visible template to prevent smarty variable name collision issues, and for memory optimization purposes. This may cause problems when trying to export variables to other templates, or when trying to use a variable created in another template.
1) Is there still a way to get this array directly from CGCalendar? I looked at the exported variables with {get_template_vars}, but was not able to find anything.
2) If not, what is the best way to do it? I guess I could manually modify the CGCalendar templates to fill up such an array structure, but maybe there is a better way..
Best regards,
leoteo