On 15/06/2010 1:07, Nate Aune wrote:
The .tmpl option works for me. I could successfully create a plone 4 and
plone 3 hosting project.
Can I suggest to remove the plone_major from the vars definition and set
it in a pre method? It's there in the code, as I can see. Don't know why
you commented it out.
1) I want to make the template handle for Plone 3 and Plone 4, and I'm
trying to do these checks in the .tmpl file, like so:
#if $plone_major< 4
where $plone_major is an integer that is filled out on the web form
(as either 3 or 4).
it doesn't appear that these values are being evaluated, and it's
always choosing Plone 4.
should i be doing this check in the plone_hosting.py file, as in:
I guess that the only way of doing this is by changing zopeskel.vars.var
class by adding some new parameters to the vars. Something like:
2) Is it possible to do conditional display of questions? For example,
if they say they want to install Apache, then I need to ask them what
port they want to run it on on the next page, but if they choose not
to install Apache, then I don't want to show this question at all.
self.name = name
self.precondition = "some string with a very strict syntax that
should evaluate to True/False"
Then, a new check_vars method in zopeskel.base.BaseTemplate class should
be added (or updated) to handle these preconditions.
Of course, it's easy for me to say this :)
I suppose that by using preconditions (or something similar) like above
you should be able to manage hiding based on pages.
3) Can you hide an entire page depending on the answer to a previous
question? For example, if I ask them if they want to deploy the
buildout to a hosting provider, and they answer yes, then on the next
page I want to ask them all the hosting provider information. If they
answer no, then I don't want to show that page at all.
Hope this helps
*Marcos F. Romero*
Responsable de Desarrollo
+54 11 4542-8299
ZopeSkel mailing list