Welcome to the Liquify Community

Updated 2 months ago

Is there a way to add such an Slider that the client can change this Logo Size?

Like in the Photo
Attachment
IMG_4D49792983A8-1.jpeg
J
c
j
34 comments
Hey @consti, to build a range slider, you can do the following:
Create a webflow embed and put a li-settings:custom="Logo Size" attribute on it.
In that embed, you can put the following code:

{
"type": "range",
"id": "logo_size",
"min": 10,
"max": 50,
"step": 1,
"label": "Logo Size",
"default": 16
}

You can play around with the properties, here is the documentation for the range input: https://shopify.dev/docs/storefronts/themes/architecture/settings/input-settings#range

To use the logo size for your element, you can set the following attribute:
li-attribute:style="width: {{ section.settings.logo_size }}"
If your logo and the code embed is in a block, then your element would get this attribute: li-attribute:style="width: {{ block.settings.logo_size }}"
Ich habe jetzt diesen Code mit dem attribut folgendermaßen eingefügt:
Attachment
image.png
und dem Logo folgendes Attribut:
Attachment
image.png
und wo finde ich in Shopify dann den Slider?
Sieht gut aus soweit. Der Slider ist dann auf der Section. Also in deinem Fall wahrscheinlich die Navbar
es gibt hier leider nur den Slider von dem Product Slider (wieviele Produkte angezeigt werden sollen), den gab es davor aber auch schon
are there any issues in the github log?
under issues right?
li-settings:image and li-attribute cant be combined 😦 you need the wrap the element and add the li-attribute there
no here:
Attachment
Bildschirmfoto_2024-10-10_um_13.31.20.png
in older versions also no error? via the dropdown in the popup
in one log there were some errors, but I didn´t touch these section, but in the next log they are gone
now I got these errors:
Attachment
image.png
I wrapped li-settings with li-attribute
okay no, it doesn´t work
when I convert the file without the li-attribut, then it does work without any issues and errors
this looks like you have uploaded a shopify theme file and not a webflow export.. could that be? also happens to me some time
so does it work now? you can also use a custom elemnt as a wrapper and at style="width: {{ block.settings.logo_size }}" directly
I use the github Integration but I will try the block.settings
Hi @consti, does it work now?
no, but I talked to the client and he said, that I should set a fixed size and thats okay because he will not change the size too often.
So it´okay and I don´t need this anymore
Okay 🙂 but that Kind of functionality is possible. Next time we will find the issue 👍🏼
Thank you very much!
Add a reply
Sign up and join the conversation on Discord