Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

HTML & CSS Need Help Fixing Dropdown Menu Error

Cyberz

New Coder
Hi guys, I'm new to this forum and don't entirely know the formatting, so please forgive me if anything is incorrect.

Basically, I have a pile of code for a dropdown menu I'm trying to use for my Shopify website to create a dropdown menu, as currently it's invisible and doesn't show anything.

I'm not sure which part of the code is the issue, and it says not to copy and paste huge blocks, so I'm not sure how exactly to go about this.

Any and all help would be appreciated, thanks!

[CODE title="dropdown-menu.liquid"]<ul class="site-nav-dropdown">
{% for childlink in linklists[link_child].links %}
<li {% if linklists[childlink.handle] != empty %}class="dropdown"{% endif %}>
<a href="{{ childlink.url }}" class="{% if childlink.active %}current{% endif %}">
<span>
{{ childlink.title | escape }}
</span>
{% if linklists[childlink.handle] != empty %}<i class="fa fa-caret-right"></i>{% endif %}
</a>
<ul class="site-nav-dropdown">
{% for childlink2 in linklists[childlink.handle].links %}
<li {% if linklists[childlink2.handle] != empty %}class="dropdown"{% endif %}>
<a href="{{ childlink2.url }}" class="{% if childlink2.active %}current{% endif %}">
<span>
{{ childlink2.title | escape }}
</span>
{% if linklists[childlink2.handle] != empty %}<i class="fa fa-caret-right"></i>{% endif %}
</a>
<ul class="site-nav-dropdown">
{% for childlink3 in linklists[childlink2.handle].links %}
<li>
<a href="{{ childlink3.url }}" class="{% if link.active %}current{% endif %}">
<span>
{{ childlink3.title | escape }}
</span>
</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>[/CODE]
 
Do you know what template language this is? There are elements like {% that look like a templating language, but I am not familiar with that language.
It’s a shopify theme template I’m using, Maybe that’s why? I don’t know much about this, it may not be possible to fix this myself I don’t even know
 
Hey there!

So that does seem like a weird issue. I have a few questions for you to help us better understand what's going on. Would you by a chance have the CSS? And if possible could you provide us with the URL to your store? And last but not least are you using any apps?

Do you know what template language this is? There are elements like {% that look like a templating language, but I am not familiar with that language.
It’s a shopify theme template I’m using, Maybe that’s why? I don’t know much about this, it may not be possible to fix this myself I don’t even know
So the template language is called Liquid, Shopify developed it to help with customizing stores and building apps. Here's the link if you want to learn more about it, https://shopify.dev/docs/themes/liquid/reference/basics/.
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom