I’ve proved the plugin concept very neatly by writing a simple plugin which interfaces via our own API to an independent application on another server. In this simple example, the application RentPro looks up the requested property id and returns the data item requested, address1 in the example below.
{exp:rentpro property_id='2'}
address1
{/exp:rentpro}Now, obviously I’m going to be looking to retrieve more data than this. Is it possible to get the plugin to return an array of property data, and access these data items channel-style, such as below - which is pseudo-code and doesn’t work BTW!
{exp:rentpro property_id='2'}
The address is {address1} and the town is {town}...
{/exp:rentpro}dsloan,
Yes, this is possible. Are you developing in 1.x or 2.x? You might find looking at the source of the twitter plugin, or really for that matter, any of them might prove to be helpful for you. Then loop through your results and replace variables basend on array keys. (Depending on how the API call retrieves the results).
Hope that helps.
-greg
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.