CedricRobitaille / ecommerce-pattern-library

A term-long project redesigning an ecommerce website focusing on making a pattern library.
https://loving-brahmagupta-0deb11.netlify.com/pattern-library/
0 stars 0 forks source link

Liquid File Structure / Creating New Product Folders. #22

Closed CedricRobitaille closed 4 years ago

CedricRobitaille commented 4 years ago

@thomasjbradley

So, here's my problem. On my home page, for the 3 product cards, as it stands right now, those are simply just any random product on my site.

What I want to do is, have 1 card be a "Blog page", another be "Random Icon" and the final be "Popular Icon". Upon doing some research, the best way to do that is to make a new root folder similar to the _products folder, however only display 3 cards (Blog, random and popular). From there I need to create a for loop searching through that new folder.

Where I stand now is, I have the root folder called _daily and I have the products.md's inside the _daily folder.

What I want to know is, How do I: a) get liquid to find the _daily folder. b) create the new for loop, searching the _daily folder.

thomasjbradley commented 4 years ago

Everything looks setup properly. So, I think this is all you’d need to do:

{% for thingy in site.daily %}

{% endfor %}
CedricRobitaille commented 4 years ago

@thomasjbradley

I have tried that and no cards show up.

Do I need to change the {% pattern cards/product-card-home data=product %} for this to work?

If not, perhards the root _config.yml needs to be adjusted for it?

thomasjbradley commented 4 years ago

The config looks okay. Did you put this somewhere on your site where I can see?

CedricRobitaille commented 4 years ago

@thomasjbradley

I don't know what the 'this' is you're speaking of, however I have committed the site again if you want to see what I have again.

thomasjbradley commented 4 years ago

This seems to be working. I can see the blog card on the homepage.

CedricRobitaille commented 4 years ago

Oh, okay. It just never showed for me until now. Thanks for the help.