Hi, Is it possible to detect the top folder in dtml? I means I would like to prevent squishdot to show the ../ when it is already in the top level. Rgs, Kent Sin --------------------------------- kentsin.weblogs.com kentsin.imeme.net
Sin Hang Kin wrote:
Hi,
Is it possible to detect the top folder in dtml?
I means I would like to prevent squishdot to show the ../ when it is already in the top level.
<dtml-if "_.len(PARENTS) == 1"> We're at the root folder <dtml-else> You can go up from here </dtml-if> -- Steve Alexander Software Engineer Cat-Box limited
<dtml-if "_.len(PARENTS) == 1"> We're at the root folder <dtml-else> You can go up from here </dtml-if>
I think the root folder has the title Zope too, so: <dtml-if "title == 'Zope'"> <dtml-call doo_wah_diddy> <dtml-else> <dtml-call doo_wah_diddy_daaah> </dtml-if> -Morten (0.01$)
+----[ Morten W. Petersen ]--------------------------------------------- | > <dtml-if "_.len(PARENTS) == 1"> | > We're at the root folder | > <dtml-else> | > You can go up from here | > </dtml-if> | > | | I think the root folder has the title Zope too, so: | | <dtml-if "title == 'Zope'"> | <dtml-call doo_wah_diddy> | <dtml-else> | <dtml-call doo_wah_diddy_daaah> | </dtml-if> Just don't give any other folders the title of 'Zope' -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
Just don't give any other folders the title of 'Zope'
Hmm, this is better(tm): <dtml-if "id == ''"> <dtml-var "<b>The root folder has no identity!!</b>"> <dtml-else> <dtml-var "<b>sweet</b>"> </dtml-if> You could always do a "id == '' and title == 'Zope'", but I don't think that's necessary. -Morten (0.01$) =)
participants (4)
-
Andrew Kenneth Milton -
Morten W. Petersen -
Sin Hang Kin -
Steve Alexander