Pitbull Posted September 14, 2013 Share Posted September 14, 2013 hi! i have a field called bgimage and set it to hold 1 image, & assigned to all of my site templates, with diferent images for each page, i want to use Vegas slideshow as background in my pages using a bgimage, as src $.vegas('slideshow', { backgrounds:[ { src:'images/background-1.jpg', fade:2000}, { src:'images/background-2.jpg', fade:2000} ] })('overlay', { src:'assets/img/overlay.png' }); how can i make bgimage field output in the code above thank you. Link to comment Share on other sites More sharing options...
adrian Posted September 14, 2013 Share Posted September 14, 2013 Replace: src:'assets/img/overlay.png' with: src:$page->bgimage->url EDIT: horst has it right - I wasn't awake apparently Link to comment Share on other sites More sharing options...
horst Posted September 14, 2013 Share Posted September 14, 2013 Replace: src:'assets/img/overlay.png' with: src:<?php echo $page->bgimage->url;?> or I'm wrong? - It is output into JS. 1 Link to comment Share on other sites More sharing options...
Pitbull Posted September 14, 2013 Author Share Posted September 14, 2013 thank you friends! this works fine <script> $.vegas('slideshow', { backgrounds:[ { src:'<?php echo $page->bgimage->url;?>', fade:2000} ] }); </script> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now