Hi,
before posting my question: thanks a lot for the help and keep it up with Couch!
Question...:
- I have a page where I store games (games.php).
- Games has some fields that are empty, some are required.
When showing the page-detail of a game, I load data via an XML API.
I wish to store some of the results of this API call into the game fields.
Is this possible?
It's ok for me that you need to be logged in to perform such action for example...
Thanks!
before posting my question: thanks a lot for the help and keep it up with Couch!
Question...:
- I have a page where I store games (games.php).
- Games has some fields that are empty, some are required.
When showing the page-detail of a game, I load data via an XML API.
I wish to store some of the results of this API call into the game fields.
Is this possible?
It's ok for me that you need to be logged in to perform such action for example...
- Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title="Boardgames" clonable="1">
<cms:editable name="boardgame_id" type="text"/>
<cms:editable name="boardgame_cover" type="text"/>
<cms:editable name="boardgame_name" type="text"/>
</cms:template>
<cms:php>
global $xml;
$xml = simplexml_load_file('https://api.geekdo.com/xmlapi/boardgame/<cms:show boardgame_id/');
// I WANT TO STORE THIS VALUE TO "boargame_cover"
echo $xml->boardgame->thumbnail;
</cms:php>
<?php COUCH::invoke(); ?>
Thanks!