3373 Posts in 947 Topics by 848 members
|Go to End|
2 July 2009 at 7:12am
Couple questions here...
So I have a site that is more Data driven than page driven. To be sure, there are pages, but those pages contain iterable lists of data, as well as use additional 3rd party REST API's to get their data. I have used these 3rd Party API's before, and I have my own custom obejcts to handle them.
Where is the best place for me to import my custom objects? mysite/code/MyPageController.php? I am assuming I should NOT store the code in mysite/code so I will be doing a require to get it in.
I have about 2000 records that I need pages for. Traditionally, I would make 1 template(not a silverstripe template) file, and change the content based on the query string. I assume this is possible in Silverstripe, and I am just looking in the wrong place. Or if it's not, is there a way for me to programatically import 2000 pages. Each page will contain at least 1 image, it's not a store so the commerce module is out or is it?
When dealing with 3rd Party APIs, is there an object that implements Iterator in Sapphire that can feed <% controls %> with a custom data source (lets just say an array) or does everything need to be derived from MySQL Queries for <% controls %>?
Thanks! Hope these questions make sense re: what I am trying to accomplish!
2 July 2009 at 8:07am Last edited: 2 July 2009 8:10am
I can use that for the 2000 Items... that's all they are really are: DataObject's. How would I tell a page which DataObject it should use for it's data source?
There is this FileDataObjectManager() but it looks like I would still have to created 2000 pages, one for each DataObject.
Also how would you go about having different pages consume that data? Eg, say I need to have a list on Page1, and Page2, but Page3 is the origin of the DataObjects?
|Go to Top|