JSON export
Permalink
Hi guys
I have an ipad app that is getting JSON calls from a web server in order to display content. the ipad app works pretty well but I think perhaps C5 could be used to replace the webserver app that we currently have, which not as stable as I wish it was an requires too much efforts. So if you are a seasoned C5 coder who is really proficient with JSON and interested in the job, read below and get in touch with me via PM
Here is an example of one of the calls
"id": "20",
"title": "some title",
"public": "false",
"layout": "3x3",
"thumbnail": "http://C5 file manager URL",
"timestamp": "2012-11-26 19:09:07",
"description": "",
"type": "ipad",
"status": "Publish",
"order_no": "1",
etc
In terms of content, we have different type of pages. Each page creates its own JSON call which is read by the ipad
1- homepage which is basically just a page list (thumbnail and title) of 9 subpages, either a single page or a parent of a group of pages
2- group of page type, which is again just a page list, displaying all subpages below it (a thumbnail and a title)
3- video page which is displaying a video from the server
4- content page with the following features
- a title
- one area containing either an image or a slideshow of images
- one or more area containing text, each additional text area appearing under a new tab
5-a "bookmarks" page which sends a list of external URLS with, for each URL, a short title and a preview image
Images can have attributes that are used in the website, and the sets can be used as well.
All this content can be simultaneously displayed on a website, or not. So there are some pages attribute like "type": which controls if the page should be seen on the ipad or not, and on the website or not. The template to use for the website itself are extremely simple, it's actually pretty much like C5's default. The layout on the ipad is controlled at the ipad level, so the only information sent is what type of template should be used.
On the ipad pages must appear in the same order as in C5 treeview.
We also need a separate call, formatted slightly differently because it contains everything, to be able to download all the site content within the cache of the ipad app. Such as
{
"contents":[
{
"content_id":"",
"type":"",
"value1":"",
"value2":"",
"value3":"",
"description":""
}
],
"group_links":[
{
"id":"",
"group_id":"",
"order_number":"",
"type":"",
"link_id":""
}
],
"group_tables":[
{
"group_id":"",
"title":"",
"public":"",
"layout":"",
"thumbnail":"",
"timestamp":"",
"order_no":""
}
],
"homepages":[
//array of simple integer group IDs
],
"posts":[
{
"post_id":"",
"title":"",
"description":"",
"public":"",
"thumbnail":"",
"timestamp":"",
"layout":"",
"tags":"",
"type":"",
"link":""
}
],
"post_contents":[
{
"content_id":"",
"post_id":"",
"order_number":""
}
]
}
My idea would be to build a C5 addon that contains the JSON calls output plus a ready-made template for each page type, with only the available attributes, in order to avoid mistakes when editing the site, and allow to deploy the solution easily.
Anyone ?
I have an ipad app that is getting JSON calls from a web server in order to display content. the ipad app works pretty well but I think perhaps C5 could be used to replace the webserver app that we currently have, which not as stable as I wish it was an requires too much efforts. So if you are a seasoned C5 coder who is really proficient with JSON and interested in the job, read below and get in touch with me via PM
Here is an example of one of the calls
"id": "20",
"title": "some title",
"public": "false",
"layout": "3x3",
"thumbnail": "http://C5 file manager URL",
"timestamp": "2012-11-26 19:09:07",
"description": "",
"type": "ipad",
"status": "Publish",
"order_no": "1",
etc
In terms of content, we have different type of pages. Each page creates its own JSON call which is read by the ipad
1- homepage which is basically just a page list (thumbnail and title) of 9 subpages, either a single page or a parent of a group of pages
2- group of page type, which is again just a page list, displaying all subpages below it (a thumbnail and a title)
3- video page which is displaying a video from the server
4- content page with the following features
- a title
- one area containing either an image or a slideshow of images
- one or more area containing text, each additional text area appearing under a new tab
5-a "bookmarks" page which sends a list of external URLS with, for each URL, a short title and a preview image
Images can have attributes that are used in the website, and the sets can be used as well.
All this content can be simultaneously displayed on a website, or not. So there are some pages attribute like "type": which controls if the page should be seen on the ipad or not, and on the website or not. The template to use for the website itself are extremely simple, it's actually pretty much like C5's default. The layout on the ipad is controlled at the ipad level, so the only information sent is what type of template should be used.
On the ipad pages must appear in the same order as in C5 treeview.
We also need a separate call, formatted slightly differently because it contains everything, to be able to download all the site content within the cache of the ipad app. Such as
{
"contents":[
{
"content_id":"",
"type":"",
"value1":"",
"value2":"",
"value3":"",
"description":""
}
],
"group_links":[
{
"id":"",
"group_id":"",
"order_number":"",
"type":"",
"link_id":""
}
],
"group_tables":[
{
"group_id":"",
"title":"",
"public":"",
"layout":"",
"thumbnail":"",
"timestamp":"",
"order_no":""
}
],
"homepages":[
//array of simple integer group IDs
],
"posts":[
{
"post_id":"",
"title":"",
"description":"",
"public":"",
"thumbnail":"",
"timestamp":"",
"layout":"",
"tags":"",
"type":"",
"link":""
}
],
"post_contents":[
{
"content_id":"",
"post_id":"",
"order_number":""
}
]
}
My idea would be to build a C5 addon that contains the JSON calls output plus a ready-made template for each page type, with only the available attributes, in order to avoid mistakes when editing the site, and allow to deploy the solution easily.
Anyone ?