Bonus Fields

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: Bonus Fields

Postby ruthenoid » Sun Dec 22, 2013 3:29 am

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!
ruthenoid
 
Posts: 12
Joined: Mon Jul 12, 2010 8:00 pm

Previous

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 3 guests

cron