Jump to content


Photo
- - - - -
Resolved

Add background image setting to my custom section

custom section background image

  • Please log in to reply
6 replies to this topic

#1 benmaru

benmaru

    Newbie

  • Members

  • 8 posts
  • LocationHouston, Texas
  • Framework Version:DMS
  • Country: Country Flag

Posted 01 October 2012 - 04:04 PM

Hi there,

I just create custom section and I need it to have background option selector (select image, background repeat, background potition).

I copy the code from pageline code

Please Login or Register to see this Hidden Content


and chage parameter name. The selector show up, but it CANNOT save, It's back to default state after save.
Do you have any suggestion? or some example of section that have background option selector.

Thanks

#2 Evan Mattson

Evan Mattson

    Super Member

  • Members

  • 206 posts
  • LocationAnn Arbor, MI
  • Framework Version:latest stable & beta releases
  • Country: Country Flag

Posted 02 October 2012 - 12:53 AM

It's hard to say without seeing the rest of the code around what you copied. I'm guessing it's mostly because you used the same option id as the page_background_image which is going to conflict with.. that option :). Option id's need to be unique. Something like sectionslug_background_image would be better. It's a background for the section, not the page right? If so, the selectors key won't be necessary.

For an example of how this option is made use of, you can check out the do_background_image function inside includes/class.render.css.php.

Hope that helps!

#3 benmaru

benmaru

    Newbie

  • Members

  • 8 posts
  • LocationHouston, Texas
  • Framework Version:DMS
  • Country: Country Flag

Posted 02 October 2012 - 07:10 AM

Thanks

Please Login or Register to see this Hidden Content



I had change option_id, It's not work either.
Now I combine 'image_upload' and 'select' to work like 'background_image' instead :)

#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 15680 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 02 October 2012 - 10:47 AM

Hi,

Is this now resolved ?

#5 benmaru

benmaru

    Newbie

  • Members

  • 8 posts
  • LocationHouston, Texas
  • Framework Version:DMS
  • Country: Country Flag

Posted 02 October 2012 - 04:37 PM

Yes, can't find where I can mark this as resolved.
Thanks.

#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 02 October 2012 - 05:32 PM

Marking it as resolved for you.

#7 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 02 October 2012 - 05:32 PM

The topic was marked as resolved.





Also tagged with one or more of these keywords: Resolved, custom section, background image