another tal questions
Is there a TAL equivalent for this DHTML statement: <dtml-var sequence-item html_quote newline_to_br> I used the python statement: context.manage_addProduct['OFSP'].manage_addFile(id, title="", file="description") to add the file and I want now, within my TAL to read the 'description' I tried : <b tal:content="item/description"> news </b> Thanks Kate
Kate Legere wrote:
Is there a TAL equivalent for this DHTML statement: <dtml-var sequence-item html_quote newline_to_br>
I used the python statement: context.manage_addProduct['OFSP'].manage_addFile(id, title="", file="description")
to add the file and I want now, within my TAL to read the 'description' I tried :
<b tal:content="item/description"> news </b>
The DTML transform methods are available in the Products.PythonScripts.standard package. You can do:: <b tal:define="pss python:Products.PythonScripts.standard" tal:content="python: pss.newline_to_br(item.description)"> news </b> The default operation of taL:content does an HTML quote, but you can nest such calls if you like. Of course, you can expand the 'pss' and forget the 'define' or define the shortcut to the library higher up. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
As this doesn't work for me, can I safely assume that I will need to import the Products.PythonScripts.standard package as something separate from my original Zope installation - I didn't handle the installation myself. Kate The DTML transform methods are available in the Products.PythonScripts.standard package. You can do:: <b tal:define="pss python:Products.PythonScripts.standard" tal:content="python: pss.newline_to_br(item.description)"> news </b> The default operation of taL:content does an HTML quote, but you can nest such calls if you like. Of course, you can expand the 'pss' and forget the 'define' or define the shortcut to the library higher up. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."
Newbie question/ My system is working fine so far, the only problem is the Events form, which crashed suddenly, with no apparent reason. Now, the colors are gray, the screen is weird, with calendar displayed over the form area. No user can add a new event, and an attempt is made to save a new event the following error message is displayed: ('failure', <PloneSite instance at 01D93368>, {'portal_status_message': 'Error saving event.'}) It is really a mess. This is happening only in one of my instances, which is used by staff. The other instance (used for tests) is completely fine with events creation. I believe some of plone files was corrupted. Is there any quick way to restore the original Event form, by deleting/restoring some plone files or configuring something on ZOPE? Unfortunately, I am not a specialist on programming plone/python language, nor have enough time to go further. Any feedback or link to other information would be very appreciated. Does anybody here have a clue? If you need more details, I may send you the screenshots of the form on a private message. Thanks in advance, Beto --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.545 / Virus Database: 339 - Release Date: 27/11/2003
Roberto Campainha wrote at 2003-12-2 15:12 -0400:
My system is working fine so far, the only problem is the Events form, which crashed suddenly, with no apparent reason. Now, the colors are gray, the screen is weird, with calendar displayed over the form area. No user can add a new event, and an attempt is made to save a new event the following error message is displayed:
('failure', <PloneSite instance at 01D93368>, {'portal_status_message': 'Error saving event.'})
This looks like a form controller action return value. Maybe, a Python Script designed to be used as a form controller action is called directly. This may be caused by a wrong URL (not including "portal_form"). Check the URLs related to event handling. -- Dieter
Kate Legere wrote:
As this doesn't work for me, can I safely assume that I will need to import the Products.PythonScripts.standard package as something separate from my original Zope installation - I didn't handle the installation myself.
Zope will always come with this. It doesn't work because I screwed up. I was doing it by memory and didn't do it right. Try this instead:: <b tal:define="pss modules/Products/PythonScripts/standard" tal:content="python: pss.newline_to_br(item.description)"> news </b>
The DTML transform methods are available in the Products.PythonScripts.standard package. You can do::
<b tal:define="pss python:Products.PythonScripts.standard" tal:content="python: pss.newline_to_br(item.description)"> news </b>
The default operation of taL:content does an HTML quote, but you can nest such calls if you like. Of course, you can expand the 'pss' and forget the 'define' or define the shortcut to the library higher up.
--jcc -- "Code generators follow the 80/20 rule. They solve most of the problems, but not all of the problems. There are always features and edge cases that will need hand-coding. Even if code generation could build 100 percent of the application, there will still be an endless supply of boring meetings about feature design." (http://www.devx.com/java/editorial/15511)
participants (5)
-
Dieter Maurer -
J Cameron Cooper -
J. Cameron Cooper -
Kate Legere -
Roberto Campainha