Parsing the content definition start with the type key :
There are 4 macro categories :
{ type:"text", txt:"base64 encoded" } |
name | type | description |
---|---|---|
type | string | text |
txt | string | base64 encoded string |
{ type:"site", url:"link url", open:"inside|outside" }
name | type | description |
---|---|---|
type | string | site |
url | string | link to show |
open | string | specifiy how to show the link :
|
cache | boolean | cache webview content |
autoscaling | boolean | (Apple) webview autoscaling |
backbtn_for_webview | boolean | should the back action be triggered in the webview |
{ type:"xml", urltype:"audio|image|news|..." hideimg:true|false, addform:ID, form:ID, addformlabel:"string", cache:true|false, backbtn_for_webview:true|false } |
name | type | description |
---|---|---|
type | string | xml |
urltype | string | type content of the feed
|
url | string | the feed url |
hideimg | boolean | specify if the img of the feed should be hidden If missing default is false (img visible) |
form | integer | id of the form to show prior to the feed request |
addform | integer | id of the form to show for add function |
addformlabel | string | the label to be displayed for addform button |
cache | boolean | cache webview content |
backbtn_for_webview | boolean | should the back action be triggered in the webview |
pid | int | the page ID, generated at creation time |
If the urltype is image the app should show a gallery
If the urltype is image the app should show an audio player
if the urltype is feeds the feed contents should be interpreted as a categories contents.
The items key of the /wiki/spaces/IN/pages/3112999 returned is the value of the child key of the page hash
For all the others values the view should display all the content (title,description,img) using the selected layout. The view should check the key “hideimg” that specify that the img is hidden. When a item is selected the app should check the value of the key “show” that can have this value :
In this case the app should open the value of the key “link” with an external call
In this case the app should open the value of the key “link” in a webview
In this case the app should show the value of the key “content” in a webview In the “insidelink” and “content” case the app should slideshow of news with next/prev/share
In this case the app should check the value of the key “subtype” that can have these values :
In this case you should read the check the key “values” that is an array of hash with this structure :
type:"special", subtype:"contact", values :{ name:"", value:"", type:"" }
This list should be show in a list layout setting the title with the name and the description with the value and the img url build like
/images/default/category/+type+.png
When the row is selected the app should check the type key and do a call,sms,email, web browsing.
{ type:"form", form:FORMID } |
{ type:"empty" } |