[SOLVED] Calling Module functions from within a UDT
Posted: Wed Sep 21, 2011 2:49 pm
I would like to be able to call on functionality within modules from within a UDT. The CMS Cookbook has one example of how to call the AddNewArticle in the New module to post a new News article from the within the UDT.
I am wondering if there is a way to call other functions that are not necessarily designed as a part of the API. For instance I would like to be able to get all the data about a news article by passing a function an article ID. This functionality already exists within the News module (within the action.detail.php file), but because it is not encapsulated within a function call, I am not able to call on it. I suspect there is something to do with the DoAction call, but I am not clear on the syntax.
Any ideas of how I can do this?
I am trying to avoid writing code that reads data from the News tables when all the functionality I want is already available in the News module.
TIA
-S
I am wondering if there is a way to call other functions that are not necessarily designed as a part of the API. For instance I would like to be able to get all the data about a news article by passing a function an article ID. This functionality already exists within the News module (within the action.detail.php file), but because it is not encapsulated within a function call, I am not able to call on it. I suspect there is something to do with the DoAction call, but I am not clear on the syntax.
Any ideas of how I can do this?
I am trying to avoid writing code that reads data from the News tables when all the functionality I want is already available in the News module.
TIA
-S