[Zope] flexible linking...

Breuer, Yvon YBreuer@tee.toshiba.de
Wed, 24 Jul 2002 20:32:13 +0200


Hi,

new(bie) question...


What I want:
------------
- I'm trying to make my links as flexible as possible.
- I'd like to have all links together in one folder.
- I'd like to have all texts together in one folder.


Reasons:
--------
- Later I want to impliment multi-languages (for everything, so for =
links too).
- I don't want to change every link implemented in my pages when some =
mailto- or http-address changes.
- I'm lazy. I just want to make it once and let others maintain the =
textfiles if something changes afterwards.


My setup:
---------
ROOT (folder)
	body (dtml method)

	LINKS (folder)
		link_MailtoSomeone (dtml method)
		link_HttpSomeSite (dtml method)

		MAILTO (folder)
		mailto_Me (plain/text)
		mailto_You (plain/text)

		HTTP (folder)
		http_MySite (plain/text)
		http_YourSite (plain/text)

	TEXTS (folder)
		txt_MailtoSomeone_Subject (plain/text)
		txt_MailtoSomeone_OnMouseOver (plain/text)
		txt_MailtoSomeone_Description (plain/text)


My coding:
----------
body  =3D  <dtml-var "LINKS.link_MailtoSomeone">

link_MailtoSomeone  =3D  <a href        =3D "<dtml-var =
"MAILTO.mailto_Me">"
                          subject     =3D "<dtml-var =
"TEXTS.txt_mailtoSomeone_Subject">"
                          onMouseOver =3D "window.status =3D '<dtml-var =
"TEXTS.txt_mailtoSomeone_OnMouseOver">'; return true;"
                          onMouseOut  =3D "window.status =3D ''; return =
true;"
	                 >
                       <dtml-var "TEXTS.txt_mailtoSomeone_Description">
                       </a>

mailto_Me  =3D  mailto:ybreuer@tee.toshiba.de

txt_MailtoSomeone_Subject  =3D  My question is ...

txt_MailtoSomeone_OnMouseOver  =3D  Send us an e-mail

txt_MailtoSomeone_Description  =3D  If you have a question, click this =
link


The result: (hopefully your still with me :-) )
-----------
Unfortunately, instead of showing me the appropriate link, this result =
in the following text:
<a href =3D "<dtml-var "MAILTO.mailto_Me">" subject =3D "<dtml-var =
"TEXTS.txt_mailtoSomeone_Subject">" onMouseOver =3D "window.status =3D =
'<dtml-var "TEXTS.txt_mailtoSomeone_OnMouseOver">'; return true;" =
onMouseOut =3D "window.status =3D ''; return true;" > <dtml-var =
"TEXTS.txt_mailtoSomeone_Description"> </a>


The question:
-------------
How can I prevent getting the complete string as a result in stead of =
the correct link?
(The question is simple, but is the answer? ;-) )

Best regards,

Yvon Breuer