laravel 5 - OctoberCMS Builder Plugin to Show Data on Front End -


this first time use octobercms, , provide builder plugin in order developer builds plugin in minutes.

i try use plugin show data on front end when using components > builder > record list, documentation didn't give enough example data fields. example on internet show how data 1 field.

my code shown below:

[builderlist] modelclass = "budiprasetyo\employees\models\employee" scope = "-" displaycolumn = "name" norecordsmessage = "no records found" detailspage = "-" detailsurlparameter = "id" pagenumber = "{{ :page }}" 

in case, want data not "name" field, want add "email", "facebook" fields.

i have tried make into:

displaycolumn = "name", "email", "facebook" 

but returns no data shown , have tried make array:

displaycolumn = ["name", "email", "facebook"] 

and it's same result, no data shown.

i appreciate helps, thank you.

actually don't use plugins' components. doesn't retrieve data. don't know why maybe it's because of wrong using. anyway, best way retrieve data plugin navigate code section , write onstart() function , start retrieve data.

function onstart() { $data = \authorname\pluginname\models\model::find(1); $this['data'] = $data; } 

and way you'll have data variable in markup section.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -