Page 1 of 1
[Solved] Set one image on multiple templates (open/closed)
Posted: Tue Oct 08, 2013 12:10 pm
by Geoclaps
I've searched the forum but couldn't find the answer I was looking for. I am a Dutch designer and I'm using CMSMS for a few years now. For a non-budget organisation I am making a website wich has an 'open' and 'closed' situation (ice skating field/ice rink?). I want them to simply check or click one of those 2 options in the main admin panel. After selecting one of these 2, the selected is prompted in all of the used templates in the frontend trough an image e.g. open.jpg or closed.jpg.
Is there a way I can make this happen? I'm not a coder so it's hard for me to make such code.
Thanks in advcance.
Ruurd
Re: Set one image on multiple templates (open/closed)
Posted: Tue Oct 08, 2013 12:33 pm
by Rolf
For this purpose I started developing the CustomGS module. Available in the Forge and ModuleManager.
Re: Set one image on multiple templates (open/closed)
Posted: Tue Oct 08, 2013 1:59 pm
by Geoclaps
Hey Rolf, thank you for the help so far. I am using your module now and I have created a radio button field with 2 options, eg open/closed. But now I want to include/attach an image to the values instead only showing plain text. Is this also a possibility? It's the most friendly way for my 'customer' to just click "Closed" or "Open".
Re: Set one image on multiple templates (open/closed)
Posted: Tue Oct 08, 2013 2:47 pm
by Geoclaps
I have managed to fix the issue! Took me some time but it worked:
{if $CustomGS.De_ijsbaan_is_open == '1'}
<img src='uploads/images/ijsclub-vosbergen-open.png' alt='Ijsbaan open' title='Ijsbaan open' />
{else}
<img src='uploads/images/ijsclub-vosbergen-closed.png' alt='Ijsbaan gesloten' title='Ijsbaan gesloten' />{/if}
Thank you Rolf!
Re: Set one image on multiple templates (open/closed)
Posted: Wed Oct 09, 2013 8:44 pm
by Rolf