[Solved] Set one image on multiple templates (open/closed)

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Geoclaps
Forum Members
Forum Members
Posts: 25
Joined: Tue Oct 08, 2013 12:02 pm

[Solved] Set one image on multiple templates (open/closed)

Post 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
Attachments
Image shown when the ice rink is open for public
Image shown when the ice rink is open for public
ijsclub-vosbergen-open.png (11.75 KiB) Viewed 2429 times
Image shown when the ice rink is closed for public
Image shown when the ice rink is closed for public
ijsclub-vosbergen-closed.png (11.29 KiB) Viewed 2429 times
Last edited by Geoclaps on Mon Jun 16, 2014 9:50 am, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Set one image on multiple templates (open/closed)

Post by Rolf »

For this purpose I started developing the CustomGS module. Available in the Forge and ModuleManager.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Geoclaps
Forum Members
Forum Members
Posts: 25
Joined: Tue Oct 08, 2013 12:02 pm

Re: Set one image on multiple templates (open/closed)

Post 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".
Geoclaps
Forum Members
Forum Members
Posts: 25
Joined: Tue Oct 08, 2013 12:02 pm

Re: Set one image on multiple templates (open/closed)

Post 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!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Set one image on multiple templates (open/closed)

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Modules/Add-Ons”