TW5 <$button to... Not working on static

139 views
Skip to first unread message

Richard U

unread,
Aug 30, 2015, 12:32:12 AM8/30/15
to TiddlyWiki
I have successfully exported a static version, but it broke these:

<$button to=MyTiddler >Home</$button>

I tested, and [[MyTiddler]] still works, but it is not in the desirable button format.

Also, if anyone knows. My Node.js TW5 is available on the local machine at http://127.0.0.1:8080/ 

However, I have been unable to access that from any other machine on my network. I'm trying the Local address of the Node.js machine i.e.  http://192.168.1.123:8080/. I tried opening the 8080 port, turned off the firewall, etc. Is there some other way to access this from outside the host machine?

Thanks, Richard

RichardWilliamSmith

unread,
Aug 30, 2015, 2:05:19 AM8/30/15
to TiddlyWiki
I'm afraid this sin't very clear. What do you mean 'it broke these'?

One of the neat things about TW is we can always check the default config at tiddlywiki.com which is 'just' a single-file version of the app. If I put

<$button to=MyTiddler >Home</$button>

I see that it works as expected.

Perhaps you could share a screenshot or more information about what changed between when it worked and when it didn't. 

Your second issue should be cleared up here:


Regards,
Richard

Richard U

unread,
Aug 30, 2015, 9:47:56 AM8/30/15
to tiddl...@googlegroups.com
Sorry for the ambiguity. What I meant is, the link works in the Node.js site, but does not work in the static site I created. In looking at the source for the static site that was generated, the source says:
<button class="" >Home</button>

So the process of generating the static site left out the link info. To generate the static site, I used the commands from here: http://tiddlywiki.com/#Generating%20Static%20Sites%20with%20TiddlyWiki

Is there anything else I need to do to generate a static site and maintain these internal links?

Richard U

unread,
Aug 30, 2015, 2:10:16 PM8/30/15
to TiddlyWiki
I thought maybe the problem was a lack of proper saving, but apparently TW5 on node.js saves itself. 

So, yes the code works as expected on tiddlywiki.com. The problem occurs when a static site is generated and it drops the link information from the buttons.

Screenshots would not help, because the problem is: clicking on the button works in node.js, but does nothing in the static site.

Thanks, Richard

Eric Shulman

unread,
Aug 30, 2015, 3:27:19 PM8/30/15
to TiddlyWiki
On Sunday, August 30, 2015 at 11:10:16 AM UTC-7, Richard U wrote:
I thought maybe the problem was a lack of proper saving, but apparently TW5 on node.js saves itself. 

So, yes the code works as expected on tiddlywiki.com. The problem occurs when a static site is generated and it drops the link information from the buttons.

Screenshots would not help, because the problem is: clicking on the button works in node.js, but does nothing in the static site.

The static site is just *rendered* content, written out to separate HTML files.  

When the output is generated from your TW, the syntax of each tiddler link (e.g., "[[SomeName]]) is automatically converted into real links between the relevant html files (e.g., "static/SomeName.html")

However, the resulting static site doesn't contain any *code*.  Thus, while a <$button> widget will appear in the rendered output, there are no widget handlers to process click events.

Assuming that the real end goal is to make something that *looks* like a button, but works as a "static tiddler link", perhaps you can change your TW content from
   <$button to="SomeTiddler">click me</$button>
to
   <$button>[[click me|SomeTiddler]]</$button>

i.e., use tiddler link syntax, surrounded by a <$button> widget.  You might have to tweak some CSS rules to get the button text to have the right look (e.g. normal text button text color rather than link color).

enjoy,
-e
Eric Shulman
ELS Design Studios
TiddlyTools - "Small Tools for Big Ideas!"
InsideTiddlyWiki: The Missing Manuals

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:

Evolena

unread,
Aug 30, 2015, 3:28:25 PM8/30/15
to tiddl...@googlegroups.com
Isn't it related to the fact that static version purpose is to not use Javascript?

Richard U

unread,
Aug 30, 2015, 9:05:47 PM8/30/15
to TiddlyWiki
Yes! That is the perfect answer. Now I just need to figure out "read only" and my static site will be done.

BJ

unread,
Aug 31, 2015, 6:43:38 AM8/31/15
to TiddlyWiki
Reply all
Reply to author
Forward
0 new messages