AveryDion / ecommerce-pattern-library

A term-long project redesigning an ecommerce website focusing on making a pattern library.
https://xenodochial-wright-12a0cc.netlify.com/pattern-library/#brand
0 stars 0 forks source link

Featured Product Links Not Working #4

Closed AveryDion closed 4 years ago

AveryDion commented 4 years ago

@thomasjbradley

I'm trying to link the featured cards on my index page to their product pages but it isn't working. I've tried a few different things but it seems that the variable for the link isn't being documented in the pattern on the pattern library. I'm not sure why.

thomasjbradley commented 4 years ago

Step 1: https://github.com/AveryDion/ecommerce-pattern-library/blob/master/_patterns/cards/featured-card.html#L1 Add an include parameter into the href attribute: href="{{include.url}}"

Step 2: Add a new attribute to the pattern code for that new parameter: https://github.com/AveryDion/ecommerce-pattern-library/blob/master/index.html#L11

{% pattern cards/featured-card url="/products/blah/" name="Ra…