Hello
Wanted the ability to add sections to a created page, in this case, my “about us” page. So using the command
{% section ’ ’ %} i did.
Since the page contains duplicate sections and Shopify treats these as one section, individual changes were not possible. So i created new sections resembling the sections i needed and just stored them under a slightly different name:
{% section ‘text–rich-text’ %}
{% section ‘image–image-with-text-1’ %}
{% section ‘image–image-with-text-2’ %}
{% section ‘image–image-with-text-3’ %}
{% section ‘text–rich-text-1’ %}
{% section ‘image–logo-list’ %}
{% section ‘text–rich-text-2’ %}
{% section ‘video–video-hero’ %}
Now the issue is that when I add a picture to the section “image with text” and save the changes, it disappears after a few seconds. I believe that the issue lies in the way I created the “about us” template.
Can anyone help?
Hi @Artisan-Spirits ,
You can try renaming the section ‘image–image-with-text-1’ => ‘image-image-with-text-1’ remove ‘-’
The file names are unique and you need to move the whole code.
Hope it helps!
What do you mean by moving the whole code? When I created the sections “image-with-text-1&2&3” I used the code from the already existing section, and just renamed them. Is that correct?
i tried removing the ‘-’ but the issue still appears.
any suggestions?
Hi @Artisan-Spirits ,
You can follow these steps:
-
Step 1: Create a file section named ‘image-image-with-text-1.liquid’ and copy the entire code of the file ‘image-with-text.liquid’ and paste it for the newly created file.
-
Step 2: You can paste the code for the newly created ‘about us’ template:
{% section 'image-image-with-text-1' %}
Note that the file is only declared for ‘about us’ template. If you declare the same for another template, the data may be changed when changing in the new template.
- Step 3: Go to Customize and upload an image for it.
You do the same for other sections.
Hope it helps!
Hi @LitExtension
I fixed the issue.
For some reason including the original section “image–image-with-text” and then the renamed sections “image–image-with-text-2 & 3” solved the issue.
Thx for the help.