Using twig/cms in custom component

I have created a lot of different setups as practice, really like this addition, for my use this is great as I can edit the data in the tables on my server, now hooked on this

3 Likes

That’s looking nifty, nice work!

really liking this challenge, I messed up the table not putting headers in the right place was more interested in getting it to work, trying to build a menu from the titles at the moment

ok really liking this now, had to get info from another online store selling these items, American copy and paste excuse the spelling

3 Likes

Amazing! OK next challenge get colour swatches in and make item change colour for different items! :slight_smile:

just had to sort out responsive set wrong screen sizes, I also wrote books for some reason

1 Like

thats a bit more work

Because of Elements I decide to learn Tailwind and CSS to a level I need, still working on Alpine, also Elements API and now Twig, not enough time or space in my brain - Twig is now daily reading, need to understand where or how you use all of this or if needed, I am glad I worked my way through producing a menu in Elements it helped on loops. Realmac no more please :joy: :rofl: :sweat_smile: :sleepy_face: :persevering_face: :downcast_face_with_sweat: for a while anyway

IntroducingGetTwiggyWithIt

This new templating of the twig templating system saves you time, as it replaces all that typing between curly braces with a single character, e.g. {{a}}. All you need to do is set up a translation table in your header code, and now all these abbreviated twigs become smaller sticks.

But wait, there’s more! If you buy into this today we’ll also give you TailwindBooster, which installs a fan behind your Tailwind code to make it faster than ever before.

{% set d = prices2 ?? item.prices2 ?? page.prices2 %}

{% set c = table_config ?? item.table_config ?? page.table_config %}

etc

@PMUK

the items are just :fork_and_knife_with_plate: :bowl_with_spoon: etc so I would have to create the product, anyway this is just practice, maybe when I work my way through this etc https://twig.symfony.com/doc/3.x/

1 Like

I did up load to my site and changed the price on all 3 works a treat, although with even normal cms components you can change in the markdown, as long as you dont need to keep synced you can change the Elements part at the same time

I just watched Transformers while working this

I already have tables setup, probably missed a few from previous test to update from previous project, just copy and paste mostly, looked at the math, logical operators this gives me a headache anyway so going to a while before I work through that completely, can do simple

the status does update depending on stock levels

I am addicted to Elements my wife is going to leave me :rofl: she used to work in retail never really new what sku was

this really hurts my head

The spaceship operator (<=>) is used for comparing two expressions. It returns -1, 0 or 1 when the first operand is respectively less than, equal to, or greater than the second operand.

Don’t understand yet

@dan I started here to use Twig, both the endraw’s are wrong ??