17488 Posts in 4473 Topics by 1978 members
|Go to End|
15 January 2008 at 10:48pm
I'm building a website and need to pull stuff from a SOAP instead of a MySQL server. I'm kind of new to MVC but I figured I'll create a new pagetype and in there make a controller that will call my soap. And then in the .ss-file I'll call the controller.
<% control getCategories($category) %>
<% end_control %>
$category is the category for which I want subcategories. The structure can be explained like this:
In my DB I have my top-level categories. I create a page for each top-level category and choose which category the current page represents using a "HasOneComplexTableField", pretty much like in tutorial #5.
Then, depending on which category I'm on I'll call my getCategories-controller with the current category as an argument.
I have 2 problems with this.
1. How do I get the data from the SOAP into the template? Does the <% control getCategories($category) %> expect a DataObject to be returned or can it handle arrays as well?
2. When I try the code I've done I get an error, but <% control getCategories(1) %> works fine. Do I have to make a new function for each top-level category (getCategoriesForLevelOne, getCategoriesForLevelTwo, etc.) and then have those functions call the getCategories function with a hardcoded argument (1, 2, etc.)? That seems kind of stupid...
P.S. Why can't I preview this post before I post it?
12 June 2008 at 10:28am
Kabo, did you get anywhere with your SOAP stuff?
1 August 2008 at 9:24pm
Curious to hear about this as well....
|Go to Top|