ZPatterns based CD example. Halfway there! Need help
I've got the storage entry part down. I can't seem to get the data out. It seems to me that I would put an Index_html method in the specialist but I get a aq_base error when trying to put one in. So I put it in my ZClass dataskin. Here is the code I'm using below. I tried to access it many ways. All I get is a blank sheet. I tried using <dtml-let myPPS="propertysheets.get('cd_info')"> <dtml-var "myPPS.getProperty('artist')'> But it says object does not have getProperty. Hmm. <dtml-var standard_html_header> <h1>CD</h1> <dtml-let newObj="CDManager.getItem('id') myPPS="newObj.propertysheets.get('cd_info')"> <p> artist: <dtml-var getProperty(artist)> description: <dtml-var myPPS.getProperty('description')> genre: <dtml-var "myPPS.getProperty('genre')"> </p> </dtml-let> <dtml-var standard_html_footer> Get your Free E-mail at http://tacoma.zzn.com ____________________________________________________________ Get your own Web-Based E-mail Service at http://www.zzn.com
James Johnson wrote:
I've got the storage entry part down. I can't seem to get the data out. It seems to me that I would put an Index_html method in the specialist but I get a aq_base error when trying to put one in. So I put it in my ZClass dataskin. Here is the code I'm using below. I tried to access it many ways. All I get is a blank sheet. I tried using <dtml-let myPPS="propertysheets.get('cd_info')"> <dtml-var "myPPS.getProperty('artist')'> But it says object does not have getProperty. Hmm.
Add a SkinScript method to your Specialist, under the Data-PlugIns tab, with something like this: WITH self.propertysheets.get('cd_info') COMPUTE artist=getProperty('artist'), label=getProperty('label') You can then write your ZClass index_html and use <dtml-var artist> or &dtml-artist; where you want the artist, and similarly with label. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
participants (2)
-
James Johnson -
Steve Alexander