How did you do this: expanding/collapsing layout or layout block?

I see this on the sparkle website: a user clicks on a button/link (e.g. “more” or “expand/collapse” and in this case “filter by”) and the layout expands downwards to show additional text/info. Everything beneath slides down.

I would like to use that trick!


@Monux, did you go to the Sparkle Community via Duncan’s website navigation?
What you have screenshot there can’t be done in Sparkle as far as I know.

A look in the source code reveals the secret.

Mr. F.

The community is a webapp (Discourse), not a Sparkle website.

This page for instance Search results for 'Collapse' - Sparkle Community

Okay. It shows how useful it is. I would really really really love to have that functionality: expanding/collapsing text (and maybe more than text) when you click on a button or link (and the rest slides downwards).

I love webpages that are concise and show ‘everything’ in a nutshell but give you the opportunity to click on something to see more of one topic without forcing you to leave the page and find your way back (very distracting).

Of course popups are useful for this but they block a lot of the view/space and: in my case I will have to make quite a few popups per page. And: a version for each device… And my site grows and grows.

Since we have layout blocks now that can slide down when the one above them increases in size, why not make it possible to expand/collapse a block & automatically slide down the rest?

Extra bonus: it would reduce the number of pages, for me at least.

This is on top of my wish list :slight_smile:

@Monux , you would need to embed an outside service to get the functionality you are looking for until Sparkle add the function. See this sample page: samples , look at the text pop sample middle of the page. Sparkle is a great product and does a lot, but to get all the extra things, I use other services to get extra functions.

@dpong Great! How did you do that? I’m very interested in that service. Thanks a lot for sharing!

I use this service, it offers a number of other features I embed in my sparkle sites. https://elfsight.com

I have a affiliate code, it will get you a discount 80+ Website Widgets — To Grow Your Business — Elfsight Apps, again you do not need to use the link, you can do direct.

I use this and give my clients access so they can change the content themselves and charge back the monthly fees back to them. And I charge them the monthly hosting.

Let me know if you need any other info.

Cheers
Dave

2 Likes

Just thought to ask…
When you say “I use this and give my clients access so they can change the content themselves…” are you meaning the embedded Elfsight widgets, or the actual content of a Sparkle website?

Great! Thank you. A brand new world for me! :slight_smile:

@flaminFig , I setup an elf site account for the client. When I embed the widget in the site, they have access to change the widget content. Most sites I have multiple widgets. e.g. I have a site for a union, they need to change the meeting notices every month. They can do that themselves. Or a blog page, they can add the content, They don’t have access to the sparkle pages, only the widget. My time is better spent doing the complex web stuff. Complex stuff like hooking into a database or javascript functionality. Let me know if you need more examples. This site has lots of widgets and gives me the extra stuff that Sparkle doesn’t have yet! https://mycondoguru.com

1 Like

Nifty @dpong. I see what you mean with the example you’ve given, thanks! :slight_smile:

Another question. :slight_smile:
What is the name of that widget that expands and collapses? And: what would you prefer regarding maintenance and stability: 8 of those widgets on one page or 8 sparkle popups?

Regarding look and feel I would choose the widgets but I don’t know how much complexity they add to the site structure.

@Monux as you said, it’s a whole new world, you have to look at the different widgets and see which one solves your issue. I think the text one was the FAQ widget. You will find that these widgets give you basic functionality, you may need to get some custom CSS to match the fonts and colours in your site. Each widget gives you a fair bit of customization, but to get them to work like it is part of your site, you will need to do some extra work.