Glitch - Hey 🙂 I’m a designer and quite new to...
# ❓questions
g
Hey 🙂 I’m a designer and quite new to Laravel and Twill, so please excuse if I’m asking noob-ish questions. I’m building my portfolio with Twill 3 and I managed to get a Pages model running and so on – all good so far! Now I wanted to place a featured section on my homepage, that should be based on a separate Projects model. Initially I tried to do this within a block, but I couldn’t fetch Projects in a Pages block (tried to do it in the view, because I didn’t know any better). So I read more in the docs and found out about Buckets (https://twillcms.com/docs/buckets/index.html). I got that running, but how do I actually output bucket content in a view?
i
Hi @Glitch this seems to be definitely missing from our docs, but its pretty straightforward. Buckets are saved in the
twill_features
table using the
Feature
model: https://twillcms.com/docs/api/3.x/A17/Twill/Models/Feature.html
so you can do
Feature::getForBucket('bucket_name')
g
Thank you for the incredibly fast response! That worked like a charm. ❤️