Wrap legacy function in a block?
Permalink
As a longtime php coder, I've got a ton of prior functions coded that I'd like to implement in a C5 site. Is there a simple way to wrap these within new blocks?
Say I have genericFunction.php & genericFunction.css, I think I've figured out the following requirements to "wrap" this function into a block:
Create a folder under the blocks folder
Create a basic (dummy) db.xml file to simply track the block ID
Create the add.php, edit.php, controller.php, and view.php files
I think I have all of the above, except I can't quite figure out the view.php file. I'm assuming this is the only file that actually references the legacy genericFunction.php and genericFunction.css files? But I'm not sure how. OR maybe I'm just completely missing the boat here. Suggestions would be most welcome! I've been perusing the forum for over an hour and haven't run into a solution, but if it's been documented before, by all means point me in the right direction - many thanks!
Say I have genericFunction.php & genericFunction.css, I think I've figured out the following requirements to "wrap" this function into a block:
Create a folder under the blocks folder
Create a basic (dummy) db.xml file to simply track the block ID
Create the add.php, edit.php, controller.php, and view.php files
I think I have all of the above, except I can't quite figure out the view.php file. I'm assuming this is the only file that actually references the legacy genericFunction.php and genericFunction.css files? But I'm not sure how. OR maybe I'm just completely missing the boat here. Suggestions would be most welcome! I've been perusing the forum for over an hour and haven't run into a solution, but if it's been documented before, by all means point me in the right direction - many thanks!