Page Content Definition

Parsing the content definition start with the type key :

There are 4 macro categories :

text

{
   type:"text",
   txt:"base64 encoded"
}

 

 

nametypedescription
typestringtext
txtstringbase64 encoded string

 

site

{
   type:"site",
   url:"link url",
   open:"inside|outside"
}
nametypedescription
typestringsite
urlstringlink to show
openstring

specifiy how to show the link :

  • inside
    inside the app
  • outside
    outside the app
cachebooleancache webview content
autoscalingboolean(Apple) webview autoscaling
backbtn_for_webviewbooleanshould the back action be triggered in the webview

 

xml

{
    type:"xml",
    urltype:"audio|image|news|..."
    hideimg:true|false,
    addform:ID,
    form:ID,
    addformlabel:"string",
    cache:true|false,
    backbtn_for_webview:true|false
 }
nametypedescription
typestringxml
urltypestring

type content of the feed

  • audio
  • image
  • news
urlstringthe feed url
hideimgboolean

specify if the img of the feed should be hidden

If missing default is false (img visible)

formintegerid of the form to show prior to the feed request
addformintegerid of the form to show for add function
addformlabelstringthe label to be displayed for addform button
cachebooleancache webview content
backbtn_for_webviewbooleanshould the back action be triggered in the webview
pidintthe page ID, generated at creation time

 

image

If the urltype is image the app should show a gallery

audio

If the urltype is image the app should show an audio player

feeds

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

 

Anything Else

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 :

  • link

In this case the app should open the value of the key “link” with an external call

  • insidelink

In this case the app should open the value of the key “link” in a webview

  • content

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

special

In this case the app should check the value of the key “subtype” that can have these values :

contacts

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.

 

form

{
   type:"form",
   form:FORMID
}

empty

{
   type:"empty"
}