This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
pastorryanhayden11094
It's taken me awhile but I've finally got it set up so I can add data to my database models through the backend.
Now, I want to setup a component that accesses that data through Twig and makes it available on my pages.
I have two models:
- Publication (With fields like "title", "author", "file", etc.)
- Author. (with fields like "name", "bio", thumbnail" etc.)
I have created two components:
- Publication (A single Publication listing)
- PublicationList (A listing of all of the publications)
What do I need to put in my component class so I can access Twig variables like {{publication.title}}, {{publication.thumbnail}}, etc.?
Last updated
1-1 of 1