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?
Json/XML: List items and have a detail pages
Json/XML: List items and have a detail pages
Kind regards,
HarmO
HarmO
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Json/XML: List items and have a detail pages
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.
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.
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.
Re: Json/XML: List items and have a detail pages
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
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
Re: Json/XML: List items and have a detail pages
In both cases there is development work involved.
I think the creation of a basic module would be the most logical to do.
I think the creation of a basic module would be the most logical to do.
Kind regards,
HarmO
HarmO