Gary Posted June 9, 2022 Share Posted June 9, 2022 Hi I am an extreme newbie to Process Wire. Does anyone know of a simple to follow tutorial on installing a slider but with live text instead of images. Or if not, just a basic slider with images. Thank you Link to comment Share on other sites More sharing options...
bernhard Posted June 9, 2022 Share Posted June 9, 2022 Hi @Gary and welcome to the forum! If you tell us more about your skills in general we can provide better answers... Are you familiar with PHP? With HTML/JS/CSS? How did you find PW? Why are you using it? ... 1 Link to comment Share on other sites More sharing options...
AndZyk Posted June 10, 2022 Share Posted June 10, 2022 Hi @Gary, you could: Install the core module Repeater Create a repeater field "slider" Create a textarea field "textarea" Add the textarea field to your repeater field "slider" Add the repeater field to your template Add content to the repeater in your page Then you could output your repeater in your template file like this: <?php if (count($page->slider)): ?> <ul class="slider"> <?php foreach ($page->slider as $slide): ?> <?php if ($slide->textarea): ?> <li class="slide"> <?=$slide->textarea?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> The HTML markup depends on what slider plugin for the fron-end you want to use. Regards, Andreas Link to comment Share on other sites More sharing options...
ottogal Posted June 10, 2022 Share Posted June 10, 2022 Hi @Gary, before choosing any of the countless slider scripts out there consider reading Heydon Pickering on inclusive design of sliders:A Content Slider (For sure not easy if you are a beginner...) Kind regards ottogal 1 Link to comment Share on other sites More sharing options...
Gary Posted June 10, 2022 Author Share Posted June 10, 2022 Thanks everybody! I will try them out. Thanks AndZyk for your suggestion. Just a quick question. You said "The HTML markup depends on what slider plugin for the fron-end you want to use. ". What do you mean by that? I am extremely new to ProcessWire. Thanks for you reply Benard. I am vaguely familiar with PHP and javascript. I know html and css much better. A client is using PW and wants us to make some edits. Thanks Ottogal. I will certainly check out the link you provided. Link to comment Share on other sites More sharing options...
Gary Posted June 10, 2022 Author Share Posted June 10, 2022 Hi AndZyk, I tried your code but got syntax errors in the first and last lines. Do you know what it is? I have attached file. Thanks Link to comment Share on other sites More sharing options...
bernhard Posted June 10, 2022 Share Posted June 10, 2022 you are missing one closing bracket before the : <?php if(count($page->slider)): ?> Link to comment Share on other sites More sharing options...
Gary Posted June 10, 2022 Author Share Posted June 10, 2022 I deleted the "(count" in the code and the errors have disappeared in the coding and in the php page when viewed online. I am hoping I did the right thing. Link to comment Share on other sites More sharing options...
Gary Posted June 10, 2022 Author Share Posted June 10, 2022 Thanks bernhard! That worked. Link to comment Share on other sites More sharing options...
AndZyk Posted June 13, 2022 Share Posted June 13, 2022 On 6/10/2022 at 5:39 PM, bernhard said: you are missing one closing bracket before the : Thank you for the correction. ? On 6/10/2022 at 4:01 PM, Gary said: Thanks AndZyk for your suggestion. Just a quick question. You said "The HTML markup depends on what slider plugin for the fron-end you want to use. ". What do you mean by that? I am extremely new to ProcessWire. This is not related to ProcessWire, but depending on wich slider-plugin or own slider-solution you want to use, the CSS classes or even the HTML markup would be different. For example: Slick: https://kenwheeler.github.io/slick/#getting-started Swiper: https://swiperjs.com/get-started#add-swiper-html-layout Flickity: https://flickity.metafizzy.co/#getting-started Regards, Andreas 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