Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
hi coucher!
another question.
i like to create some switcher for slider to make it on/off.

Code: Select all



Code: Select all
setting.php

<cms:editable name='slider' label='Slider Setting' opt_values="Off=|On=<cms:embed 'slider.html' />|" type='dropdown'/>


Code: Select all
<!-- Start slider  -->      
      <cms:pages masterpage='setting.php' >
      <cms:show slider />
      </cms:pages>
   <!-- End slider wrapper -->


the code not work. im sure something wrong with that. but i cant find what is wrong
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
Hi,

Can you also please paste the contents of the embedded 'slider.html'?
opt_values="Off=|On=<cms:embed 'slider.html'
KK wrote: Hi,

Can you also please paste the contents of the embedded 'slider.html'?
opt_values="Off=|On=<cms:embed 'slider.html'


heres the slider.html code KK

Code: Select all
<div class="slider_wrapper">
         
              <div class="fullwidthbanner-container">
               <div class="fullwidthbanner">
                  <ul>
                     <!-- the first slide --> 
                     <li data-transition="fade" data-slotamount="10" data-masterspeed="300" data-thumb="thumb1.html">
                              <img src="img1.jpg" alt="" class="400pxSquare"/>
                              
                                        <div class="caption lfb"
                                  data-x="20"
                                  data-y="70"
                                  data-speed="600"
                                  data-start="800"
                                  data-easing="easeOutExpo" data-end="8100" data-endspeed="600" data-endeasing="easeInSine" ><img src="img2.jpg" alt="">                                 
                               </div>                         
                                             
                                        <div class="caption managov-s-title lft"
                                  data-x="520"
                                  data-y="70"
                                  data-speed="600"
                                  data-start="900"
                                  data-easing="easeOutExpo" data-end="8200" data-endspeed="600" data-endeasing="easeInSine" >Welcome
                              </div>
                              
                              <div class="caption managov-s-title-2 lft"
                                  data-x="520"
                                  data-y="170"
                                  data-speed="600"
                                  data-start="900"
                                  data-easing="easeOutExpo" data-end="8300" data-endspeed="600" data-endeasing="easeInSine" > <span style="color:#777;"> Text </span>
                              </div>

                                        <div class="caption managov-s-text lfr "
                                  data-x="520"
                                  data-y="250"
                                  data-speed="600"
                                  data-start="1000"
                                  data-easing="easeOutExpo"  data-end="8400" data-endspeed="600" data-endeasing="easeInSine" > <span style="color:#777;"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Non sed sequi rerumar quasi repellat eum managov<br> earum praesentium totam! Quia, voluptas eaque anim uis aute irure dolor reprehenderit insed do eiusmod <br> tempor voluptate velit esse cillum dolore pariatur.</span>
                               </div>
                                       
                                        <div class="caption lfb"
                                  data-x="520"
                                  data-y="360"
                                  data-speed="600"
                                  data-start="1100"
                                  data-easing="easeOutExpo" data-end="8500" data-endspeed="600" data-endeasing="easeInSine" ><a href="#" class="button"> Learn more </a>
                              </div>
                            </li>
                                     

                  </ul>
               </div>
            </div>   

    </div>
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
OK, I get what you are trying to do but, I think, you not using the embed right.

Please change the dropdown's definition to simply this (Off/On)-
Code: Select all
<cms:editable name='slider' label='Slider Setting' opt_values="Off|On" type='dropdown'/>

and now use the selected value like this -
Code: Select all
<cms:pages masterpage='setting.php' >
    <cms:if slider='On'>
        <cms:embed 'slider.html' />
    </cms:if>
</cms:pages>

Hope this helps.
KK wrote: OK, I get what you are trying to do but, I think, you not using the embed right.

Please change the dropdown's definition to simply this (Off/On)-
Code: Select all
<cms:editable name='slider' label='Slider Setting' opt_values="Off|On" type='dropdown'/>

and now use the selected value like this -
Code: Select all
<cms:pages masterpage='setting.php' >
    <cms:if slider='On'>
        <cms:embed 'slider.html' />
    </cms:if>
</cms:pages>

Hope this helps.

OMG I Love you KK
Big Thank for you. You save me again.
As soon as possible!

Touch me up : abada[dot]zulma[at]gmail[dot]com
You are welcome :)
6 posts Page 1 of 1