Page 12 of 12

Re: Bonus Fields

PostPosted: Sun Dec 22, 2013 3:29 am
by ruthenoid
Hi!
I've created a custom bonusfields-template and edited the hook_bonusfields.php (constructor of the bonusfieldsConfig class) to make it work.
I can now choose it in the type section when creating a new bonusfield entry.
My bonusfields-template contains several input fields :
image path (text-input + file selector), a description (text-input), a checkbox and a link(text-input).
They all have different name attributes that look like : name="extrafields[tank-img]" and value attributes look like: value="%tank-img%".
This works perfectly: separate DB(pivotx_extrafields) indices are created with according fieldkeys like: tank-img, when a page is saved. The values are also loaded correctly.
Unfortunately I don't know how to retrieve my custom data in the pivotx-templates.
[[$entry.extrafields.tank-img]] will return "0".
I assume, I have to bind my custom inputs to smarty in the hook_bonusfields.php, but I have no idea how to do so.
Any help is welcome!