• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Json/XML: List items and have a detail pages
PostPosted: Mon Nov 19, 2018 1:02 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Thu Jan 26, 2012 3:22 pm
Posts: 242
Location: Belgium
Hi,
I'm currently making a website where i have sync with an external JSON or XML file.

i have done this before for video's (like here), but now, there are multiple elements that complicate things.

A: pagination:
The json/xml file will list up to 250 items. We can't all put them on 1 page.

B: detail page
Now the customer wants a detail page for each item in the xml/json file with an url like http://www.example.com/video/video-alias

I'm thinkin for point B i need to make a detail page that loads a scipt. and with a htaccess rewrite i'll have to rewrite all links for "video/*" to use the detail page and give the video alias as a variable.

Then i just need to find out how i can do the pagination on the list.
any thoughts or experiences?

_________________
Kind regards,
HarmO


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Json/XML: List items and have a detail pages
PostPosted: Mon Nov 19, 2018 2:15 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7966
Location: Fernie British Columbia, Canada
a: write a simple module that has summary and detail actions.
b: your module can register one or more routes to handle your pretty URLs
c: your actions can read the json/xml data on the server side instead of client side
d: your actions can use templates to render your summary and detail views.

The only difference between this module and any other module is that instead of retrieving data from the mysql database you are retrieving it from a json/xml or other source.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Json/XML: List items and have a detail pages
PostPosted: Sat Dec 01, 2018 3:50 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3028
Location: The Netherlands
You might consider using LISE as the module and write your own procedure (e.g. UDT) to sync the xml with LISE items. This task then could be run as a pseudo cron job or perhaps you can use real cron to request a 'hidden' page including the UDT.

Pagination can also be done using e.g. jQuery I presume but might be less efficient (client side)

https://stackoverflow.com/questions/250 ... -json-data


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting