GrafiteInc / CMS

Decoupled CMS for any Laravel app, gain control of: pages, blogs, galleries, events, images, custom modules and more.
https://cms.grafite.ca
MIT License
495 stars 104 forks source link

How to pull in faq items from the faq module in a custom template #180

Open REPTILEHAUS opened 5 years ago

REPTILEHAUS commented 5 years ago

Decided to try out this cms again but cant find out how to do this.. tried a couple of things

@include('cms-frontend::partials.myfaq') any pointers ?

REPTILEHAUS commented 5 years ago

also Undefined variable: page when doing @block("faq", "cms-frontend::partials.footer-menu")

mlantz commented 5 years ago

What do you mean by custom template? There are the theme files for FAQs which is just a basic blade file with some extras.

The block component is for pages and blog entries since they have the block component. Meaning defining a block is like saying I want to be able to have custom WYSIWYG content in this area.

davisriska commented 5 years ago

Try using the FAQRepository $repository. And get the FAQs as $repository->published(); That will give you all the FAQs that are published as a collection.