Page 1 of 1

Showtime slideshow in news article [Solved]

Posted: Mon Jan 12, 2015 1:15 pm
by douglas1438
I want to place a Showtime Slideshow in my news article, I've created a field definition for the user to add a slide show number. I originally placed the smarty {Showtime show='1'} but this was just rendered as text.

So I'm using the following in my news template:

Code: Select all

{assign var='slideshow' value=$entry->fields.SlideShow->value}
{Showtime show=$slideshow}
This works and the slideshow runs, however none of my other news fields now show any data.

UPDATE

OK, I've rechecked my code and just pasting the Smarty in to my news summary field does work but again non of the other news fields are showing

Thank you,
Chris

Re: Showtime slideshow in news article

Posted: Tue Jan 20, 2015 8:16 am
by velden
My first guess (not knowing Showtime module) is that it uses same variable name 'entry' for its, well, entries.

Not sure if this will work:

Code: Select all

{foreach from=$items item="entry"}
  {$news_entry=$entry}
  {Showtime show=$entry->fields.SlideShow->value}
  {$news_entry->title}
  ....
  ...
{/foreach}
I originally placed the smarty {Showtime show='1'} but this was just rendered as text.
If you type this text in a field you might want to check Smarty's eval

Re: Showtime slideshow in news article

Posted: Mon Feb 09, 2015 4:57 pm
by douglas1438
Renamed all variables at top of template. Solved the issue.