How to use JSON Templates with Shopify Themes

How to use JSON Templates with Shopify Themes

ShopifyDevs

3 года назад

68,941 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@kenzyco8855
@kenzyco8855 - 20.01.2022 03:35

Would you do the same for a custom templates that you can change in the product itself? I previously used minimal theme and now I moved over to Dawn. I had a custom template set up and in the product-template.liquid I had - {% if template contains 'custom-1' %} then all the code I wanted for the custom template below. I also had a template - product.custom-1. This template is only used for a few products that I custom make and I need that template so people can pick all their options without needing to email me and discuss the options.

Ответить
@browsermage
@browsermage - 21.01.2022 00:30

Nice little tutorial, thanks for sharing Liam.

Ответить
@edcupaioli8167
@edcupaioli8167 - 22.01.2022 00:14

Let's say you are doing this for a single page like an about page. I can set up the template for the page to have editable content sections for my users. They will make content edits in production, but will I get those changes in my git commit history? If I need to pull changes down to a branch and work on some things on that about page and preview my changes on a separate staging theme, will I get the production content ported into it or will I just have the staging theme content?

Ответить
@bootsified
@bootsified - 06.04.2022 21:08

I honestly don't understand the supposed advantage of being able to add sections to a page in the theme editor. Adding a section to one page adds the same section to ALL the pages that use that template, which is the same problem we've ALWAYS had with sections (I'm SO sick of article1.liquid, article2.liquid, article3.liquid, article4.liquid, etc; just so we can have unique content in our blog posts). Do we really want to give content editors the ability to easily jack up the layout for ALL your pages, blog posts, or product pages all at once? The layouts for pages on the site need to be coded in the templates, so that they can't be changed in the editor. I get that storing settings data directly in sections files gives a performance boost, but If we still have to code the layouts, what's the functional advantage to completely refactoring our sites into JSON templates?

Ответить
@Annie-zh6kf
@Annie-zh6kf - 15.05.2022 05:41

You are amazing!!! I've seriously spent HOURS searching for a tutorial like yours! THANK YOU!! Can you show how I would code a sidebar into my article page (and also into the blog list/grid page) so that I could put any sections into it? Similar to how you created JSON templates for Products and Blog, but it would be the sidebar so I could add an image, html code for ads, etc?

Thank you!

Ответить
@kirua8636
@kirua8636 - 31.05.2022 15:09

We have an issue with the 50 blocks limit. Since you cannot load a section inside a section, we cannot access all product_fields needed. Any solutions ?

Ответить
@addedlovely3673
@addedlovely3673 - 02.08.2022 16:30

Is it just me, or you can't create root .json files in the online theme editor - e.g. just 'products.json' in the templates folder, it's always has to be suffixed with a name?

Ответить
@adeisaac
@adeisaac - 14.10.2022 21:05

Hello Liam, awesome tutorials, saved me time, however, quick question, how do I implement alternate themes layout for Debut with OS 2.0, unfortunately can't render the {% theme 'alternate' %} on json template

Ответить
@JacobJGiordano
@JacobJGiordano - 30.11.2022 23:41

Thanks so much for the video — this is super helpful! I couldn't help but wonder what VS Code extensions you were using for autocompletion and creating that json snippet. 🤩

Ответить
@shanemur
@shanemur - 18.01.2023 15:08

Super confusing tutorial. Your documentation seriously lack REAL explanation!

Ответить
@rickyventaglio5811
@rickyventaglio5811 - 09.03.2023 13:02

Hey man, thanks for the video. I’m struggling a lot to edit my default layout of the blog page and of the blog article page.
I’m new to Shopify and liquid language. What I don’t understand is: does each front end page in Shopify is made of a .json and a .liquid file?

I can’t even edit the style of H2 in my article front end cusomizer! 🫣

Ответить
@USMC-Goose
@USMC-Goose - 24.03.2023 19:21

Wow, nice sign on the wall behind you...real professional.

Ответить
@FietsBand-t3w
@FietsBand-t3w - 07.07.2023 00:26

Ok but the cart object is also a json? And good luck putting a wrapper around them. If you start with dawn and you build and build upon to the cart. You all of a sudden notice you can't put a wrapper around it in order to make the main-cart-items and main-cart-footer in a wrapper. Oh my great stuff. Ya'll overcomplicate things.

Ответить
@ioannisme7495
@ioannisme7495 - 03.08.2023 08:18

i fall asleep

Ответить
@KathrynCostello
@KathrynCostello - 15.01.2024 04:05

Just what I was looking for! Thanks!

Ответить
@AspenPowers-ep3sv
@AspenPowers-ep3sv - 12.04.2024 18:47

Do you have anything on customizing buttons per page based on the content on that page?

Ответить
@TheFullVideoGuy
@TheFullVideoGuy - 10.07.2024 04:20

I want to create a blog template. Can I do it this way? and How would i?

Ответить