Search

Hi,

I am currently working on my first Symphony cms system (it rocks!). I have a request from the client to enable them to change the background image for the site.

My first thought was to create a simple 'Background Image' section and allow them to upload a few images. How can I restrict them to choosing only 1 of these images?

I was thinking of adding a 'current' checkbox to the section but is there a way to only enable 1 'background image' to have 'current' ticked at any one time? Or am I looking at this the wrong way?

If all you need is one bg image you could simply add a default uploadfield to a 'config' section or something.

You could also set up a complete Section only for these images (with e.g. a title and a uploadfield) then, in another section ('config'?) you add a selectbox link or subsection manager field linking to your bg image section and make sure to de-select allow multiple.

I was thinking of adding a 'current' checkbox to the section but is there a way to only enable 1 'background image' to have 'current' ticked at any one time? Or am I looking at this the wrong way?

The Unique Checkbox Field estension allows you to do that. Its desription says

The Unique Checkbox Field is a checkbox that lets you limit the number of entries that can be checked at any one time, with the option to allow entries to steal the checked state from other entries.

excellent suggestions guys, thanks.

@davidhund I'll try the Unique Checkbox Field for this but i'll use your idea for the 'config' section for another aspect of the site.

@klaftertief I'll check out the Unique Checkbox Field and see how it works.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details