[TW5] How to put \define into html code?

74 views
Skip to first unread message

sini-Kit

unread,
Apr 29, 2017, 10:44:09 AM4/29/17
to TiddlyWiki
Hi! I have a very simple html code, but not able to put \define to it

\define shopurl()
{{$:/_siteURL}}save.php  
\end

<a href=<<shopurl>>>urlLink</a>

<form action=<<shopurl>> .....



my browser renders it as

<a href="{{$:/_siteURL}}save.php   ">urlLink</a>


may be I have a mistake in my code?

Thomas Elmiger

unread,
Apr 30, 2017, 7:42:09 AM4/30/17
to TiddlyWiki
Hi sini-Kit

To insert the value of the transcluded tiddler you can wikify your definition like this:

\define shopurl()
{{$:/_siteURL}}save.php
\end

<$wikify name="shopurlvalue" text="<<shopurl>>">

<a href=<<shopurlvalue>>>urlLink</a>

<form action=<<shopurl>> .....

</$wikify>


Good luck!
Thomas

sini-Kit

unread,
Apr 30, 2017, 10:41:42 AM4/30/17
to TiddlyWiki
Thank you Thomas! I have newer heard about $wikify  and it works great!!!

воскресенье, 30 апреля 2017 г., 14:42:09 UTC+3 пользователь Thomas Elmiger написал:
Reply all
Reply to author
Forward
0 new messages