Jump to content

Recommended Posts

I have been digging for a while, but I didn't find a user friendly image slider. Is there something somewhere already?

Share this post


Link to post
Share on other sites

Hi,

honestly, i've build a lot of sliders in websites with pw, depending of what you're using as js, there are a lot of plugins out there, vanilla, jquery or zepto (i love the vegas one that runs with jquery or zepto 🙂 )
simple ones are even easy to build self made with vanilla js


when it comes to a simple admin for it, depending of what you're going to do, image slider with just a simple legend/text, an image field will do the job using the description for the text part
if you want to go a little further, just use a repeater... image field(s) in each item, text, richt text, you'll not run into any limit

in both cases your user can order the slides dragging the items with their mouse, hard to find something easier 🙂

have a nice day

  • Like 2

Share this post


Link to post
Share on other sites

I usually tend to avoid js if possible, but the idea to use it here definitely makes sense. Not what I had in mind in the first place, but good approach, thanks 🙂

Edit: However, this doesn't really help to place it freely with CKEditor somewhere into the page, which is something people often expect since this is more or less a basic functionality they know from systems like WP. I think I can create this myself though.

 

Share this post


Link to post
Share on other sites

Hi,

On 4/12/2021 at 6:53 AM, Smirftsch said:

I usually tend to avoid js if possible, but the idea to use it here definitely makes sense. Not what I had in mind in the first place, but good approach, thanks 🙂

Edit: However, this doesn't really help to place it freely with CKEditor somewhere into the page, which is something people often expect since this is more or less a basic functionality they know from systems like WP. I think I can create this myself though.

 

that's where comes, once more, the beauty of pw...
something you can easily do, just create a hidden page, let's say "sliders" (can use an template without file)
this page will have children using a template without file too, template to which you'll just need to associate the repeater used to create your sliders elements

and this is where the magic comes, Hannacode! create yours, something as easy as [[slider id=123]] or [[slider name="xxx"]] id being. the id od the page containing the slider, name... well guess 🙂

and where you want your user to be abble to use them, just add TextformatterHannaCode to your ckeditor; job done, it works a little like wp shortcodes but; a little difference, it works, it lets you write and use the code you want without generating hundreds of html/js/css lines in the page, it won't be broken by some update and it's fast as hell
i let you decide where and how to tell your user what code to use, personally, i use kogondo's https://processwire.com/modules/fieldtype-runtime-markup/
it makes easy to add an easily selectable piece of code inside a readonly input in the backend, live example for a customer who wanted to be able to create carrousels and use them anywhere in any page
custominput.jpg.b597748e2577474cbf1ec87abad07fe5.jpg

if french, sorry, but you get the idea and, below, there is... a title and a simple repeater, the user has just to add a p in ckeditor, paste the code and hannacode takes care of what's left to do 🙂

hope it helps

have a nice day

 

 

  • Like 2

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...