Darn I thought as much. Oh well glad I caught it now and not a week later. I'm trying to create a set of web pages, by using the index_html method I was able to then show set properties in different ways, except for this one problem. So I tried inheriting from a DTML Method and Document but it seems I cant use the index_html method anymore to insert headers and footers etc... it just renders the Method / Document data. There are lots of non-technical users who are going to be adding code and the page is complex, so I would like to not have a whole bunch of <dtml-var> tags they can't touch. People must have come across this before though. Once again thanks for the help and I hope this makes sense.
Yes this works, but not in my instance. Since I stupidly mixed html and dtml in property, acquring that property doesnt make sense since it will be along the lines of "<p>Test<dtml-var "absolute_url()"></p>" for example.
I hate to say this, but whenever you hit something weird like this, you designed something wrong. If I were you, I would check my design and think whether I could do it different.
Regards, Stephan -- Stephan Richter - (901) 573-3308 - srichter@cbu.edu CBU - Physics & Chemistry; Framework Web - Web Design & Development PGP Key: 735E C61E 5C64 F430 4F9C 798E DCA2 07E3 E42B 5391
Danae and Andy wrote:
Darn I thought as much. Oh well glad I caught it now and not a week later.
I'm trying to create a set of web pages, by using the index_html method I was able to then show set properties in different ways, except for this one problem. So I tried inheriting from a DTML Method and Document but it seems I cant use the index_html method anymore to insert headers and footers etc... it just renders the Method / Document data.
There are lots of non-technical users who are going to be adding code and the page is complex, so I would like to not have a whole bunch of <dtml-var> tags they can't touch. People must have come across this before though.
Once again thanks for the help and I hope this makes sense.
Yes this works, but not in my instance. Since I stupidly mixed html and dtml in property, acquring that property doesnt make sense since it will be along the lines of "<p>Test<dtml-var "absolute_url()"></p>" for example.
I hate to say this, but whenever you hit something weird like this, you designed something wrong. If I were you, I would check my design and think whether I could do it different.
Change your design as follows: * Derive your ZClass from ObjectManager * Create DTML methods for your new ZClass that will add DTML Method subobjects to your instances to contain your html and dtml code -- Steve Alexander Software Engineer Cat-Box limited
Thanks for the help. Now im lost, as a newbie with only half a day left to show something to my boss Im in trouble. I havent found any tutorials on sub objects, the ZDG is very lame on this area. Do you know of anything you can point me at? Thanks.
Change your design as follows:
* Derive your ZClass from ObjectManager * Create DTML methods for your new ZClass that will add DTML Method subobjects to your instances to contain your html and dtml code
-- Steve Alexander Software Engineer Cat-Box limited
Danae and Andy wrote:
Thanks for the help. Now im lost, as a newbie with only half a day left to show something to my boss Im in trouble. I havent found any tutorials on sub objects, the ZDG is very lame on this area. Do you know of anything you can point me at?
This howto explains more or less what to do: http://www.zope.org/Members/mukhsein/job_board_howto There are a couple of typos in it, though IIRC. Basically: * Create a new ZClass in your product. * Choose ObjectManager as a base class. * Once you have generated your ZClass, look on the "subobjects" tab of the management screen. Select "DTML Method" from the multiple- selection list. Now, you can create instances of your ZClass from the management screens, and you'll be able to create DTML Methods inside it. Look at the source code to the management screens for hints on how to create new DTML Methods from your own ZClass methods. Also, see the ZQR. http://www.zope.org/Members/ZQR -- Steve Alexander Software Engineer Cat-Box limited
participants (2)
-
Danae and Andy -
Steve Alexander