Originally Posted by
winanscreative
That is awesome, Ruud... I may have a project coming up where this would come in handy, so I will take a peek through your code and see how it works and offer some input. Is the full code in the ER, or can you post it here?
I sent you the code, although I have improved on it.
The next hurdle for me to tackle is adding an administrative interface. I thought of adding a button to each order row (in main.php?do=iso_orders). I got that in through the tl_iso_orders.php file:
Code:
$GLOBALS['TL_DCA']['tl_iso_orders']['list']['operations']['uploads'] = array
(
'label' => &$GLOBALS['TL_LANG']['tl_iso_orders']['uploads'],
'href' => 'table=tl_iso_uploads',
'icon' => 'tablewizard.gif',
'button_callback' => array('iso_orders_uploads', 'uploadsButton')
);
If I have that link point to an key (like uploads) I can use a custom function to generate the contents. But I thought it would be nice to have contao handle it as per normal functionality. But when I add tl_iso_order_uploads.php and add some default dca contents I get an error. I'm not sure what the link should be and what contao parts I have to add to continue from the iso_orders junction....
edit: I looked through the log and figured out I did not include the table in the backend modules list of tables. After that all went well and I can now do basic administration as well. Given more time I could make it good enough for the repository, right now it has too many holes to fix.
Bookmarks