Hello I’ve a section with different title. At first I used the followind ID: id=“product-section” and it was working then I changed it to use this ID : id=“{section.settings.title}” this section is called featured-collection-menu.liquid
I would like to use this ID as an anchor link in my other section called : link-menu-cafe.liquid but I don’t find out how to recover this id to use it well. I want that my block title match my section title and linked it together. What am I doing wrong and how can I solve it ?
{% for block in section.blocks %}
{% endfor %}
1 Like
Hi @M_B_LWS
If you were trying to provide the anchor link with the section ID, I would suggest to add a block for the link. Check the section ID of the section you want to refer it too. Use inspect tool to get the ID. Then add the link to your block as follow. www.your-store.com#section_id
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
I want it dynamically so if the section is delete or replace by an other one the id will change. This is for that I want to use the Title of the section and not the ID in the tool. Am I clear with my explanation ?
Hi @M_B_LWS
If the said sections will be only one in every page. Example, one featured-collection-menu.liquid, and one link-menu-cafe.liquid. I would suggest on providing the ID of the said section statically.
Example for link-menu-cafe.liquid. I added the ID in the container
{% for block in section.blocks %}
{{ block.settings.title }}
{% endfor %}
You will then always provide the link us follows
{{ block.settings.title }}
If the said sections will be multiple in the same page. You need to do the first recommendation I gave. There would be no way for the section to listen to the ID of the section.