Home
/home.htm
ZWiki Page
Title : Navigation Table version 2 Parameter List :self,t=Home,a='',items=[Folder,ZWiki Page,'DTML Document'],f=1 The body: # #t =title of table #a =link adress title #items=list with zope items #f =1 for table with width=100% # # set colors c_border=#000000 c_title=#333399 c_body=#4444aa ret=' ret=ret+<table' if f==1: ret=ret+ width="100%" ret=ret+' border="0" cellspacing="0" cellpadding="1" bgcolor="'+c_border++"><tr><td> ret=ret+<table width="100%" border="0" cellspacing="1" cellpadding="3"> ret=ret+'<tr><td align=left bgcolor="'+c_title+'"> <img src="/img/nav/bar.jpg" border=0> <a href="'+a+'" class="tmap2">+t+</a> <img src="/img/nav/bar.jpg" border=0></td></tr> ret=ret+<tr><td bgcolor="'+c_body+"> for i in self.objectItems(items): o=i[1] #the object title=o.title id=i[0] if (title != '' and id != index_html) or o.getNodeName()==ZWikiPage : #ret=ret+<img src=" #ret=ret+/img/nav/arr_left.gif ret=ret+'<img src="'+self.iconspath if o.hasProperty(ico): ret=ret+o.ico else: ret=ret+Leaf.gif ret=ret+'"> <a href="'+o.absolute_url()+" if o.hasProperty(tar): ret=ret+'target="'+o.tar+'" ret=ret+ class="map2" >+title+</a><br>' ret=ret+</td></tr></table></td></tr></table><br> return ret
Folder
The body: # #t =title of table #a =link adress title #items=list with zope items #f =1 for table with width=100% #
# set colors c_border=#000000 c_title=#333399 c_body=#4444aa
#000000
#333399
#4444aa
ret=' ret=ret+<table' if f==1: ret=ret+ width="100%" ret=ret+' border="0" cellspacing="0" cellpadding="1" bgcolor="'+c_border++"><tr><td> ret=ret+<table width="100%" border="0" cellspacing="1" cellpadding="3"> ret=ret+'<tr><td align=left bgcolor="'+c_title+'"> <img src="/img/nav/bar.jpg" border=0> <a href="'+a+'" class="tmap2">+t+</a> <img src="/img/nav/bar.jpg" border=0></td></tr> ret=ret+<tr><td bgcolor="'+c_body+"> for i in self.objectItems(items): o=i[1] #the object title=o.title id=i[0] if (title != '' and id != index_html) or o.getNodeName()==ZWikiPage :
ret=ret+
width="100%"
+"><tr><td>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
+t+
">
index_html
ZWikiPage
#ret=ret+<img src=" #ret=ret+/img/nav/arr_left.gif
<img src="
/img/nav/arr_left.gif
ret=ret+'<img src="'+self.iconspath if o.hasProperty(ico): ret=ret+o.ico else: ret=ret+Leaf.gif
ico
Leaf.gif
ret=ret+'"> <a href="'+o.absolute_url()+" if o.hasProperty(tar): ret=ret+'target="'+o.tar+'" ret=ret+ class="map2" >+title+</a><br>'
"
tar
+title+
ret=ret+</td></tr></table></td></tr></table><br>
</td></tr></table></td></tr></table><br>
return ret
# #t =title of table #a =link adress title #items=list with zope items #f =1 for table with width=100% # Sample: <h1>Nav table 1</h1> <dtml-var "navtable1(PARENTS[-1],Home,/home.htm,[ZWiki Page,'DTML Document'],0)"> <h1>Nav table 2</h1> <dtml-var "navtable2(PARENTS[-1],Home,/home.htm,[ZWiki Page,'DTML Document'],0)">
<h1>Nav table 2</h1> <dtml-var "navtable2(PARENTS[-1],Home,/home.htm,[ZWiki Page,'DTML Document'],0)">
lista=self.objectItems(items) lista.sort() for i in lista: instead of using this : for i in self.objectItems(items):
instead of using this :
for i in self.objectItems(items):