Transclusion as per Mark S.

83 views
Skip to first unread message

Peter Buyze

unread,
May 12, 2020, 9:03:11 AM5/12/20
to TiddlyWiki forum
Mark,

I decided to follow your example and use the "TE" transclusion code that allows inline editing of transclusions.

If have noticed that, when I do a transclusion, new tiddlers are formed spontaneously. I have posted 2 of those on my Tiddlyspot site http://peterspottiddly.tiddlyspot.com/

The titles are:

TE-263800324

TE--733562403


Notice also the single and double dashes.

Can these tiddlers be deleted safely? Can they be prevented?

--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:

Mark S.

unread,
May 12, 2020, 9:38:28 AM5/12/20
to TiddlyWiki
Well, I didn't expect anyone to actually use it...

Those are state tiddlers. This version will delete them when you switch back to "show". Be sure to make a backup before trying.

<$reveal state=<<qualify "TE">> type="nomatch" text="edit"><$transclude mode="block"/> <$button class="mybuttons" set=<<qualify "TE">> setTo="edit">Edit</$button>
</$reveal>
<$reveal state=<<qualify "TE">> type="match" text="edit"><$transclude tiddler="$:/core/ui/EditTemplate" /> <$button class="mybuttons" ><$action-deletetiddler $tiddler=<<qualify "TE">>/>Show</$button></$reveal>

I guess another improvement would be to make them system tiddlers (e.g. $:/temp/TE) so that they don't show up in the "recent" list.

Peter Buyze

unread,
May 12, 2020, 9:44:40 AM5/12/20
to 'Mark S.' via TiddlyWiki
Mark,
with the new code I don't get the Edit and Show buttons anymore.


12 May 2020, 16:38 by tiddl...@googlegroups.com:
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mark S.

unread,
May 12, 2020, 9:54:35 AM5/12/20
to TiddlyWiki
Are you sure you pasted it in correctly? I'm using it right now, and it's fine. It should definitely not affect the display of the "edit" button, even if something happened to the "show" button. Maybe export your TE template, a sample master tiddler, and some sub-tiddlers?


On Tuesday, May 12, 2020 at 6:44:40 AM UTC-7, Peter Buyze wrote:
Mark,
with the new code I don't get the Edit and Show buttons anymore.


12 May 2020, 16:38 by tiddl...@googlegroups.com:
Well, I didn't expect anyone to actually use it...

Those are state tiddlers. This version will delete them when you switch back to "show". Be sure to make a backup before trying.

<$reveal state=<<qualify "TE">> type="nomatch" text="edit"><$transclude mode="block"/> <$button class="mybuttons" set=<<qualify "TE">> setTo="edit">Edit</$button>
</$reveal>
<$reveal state=<<qualify "TE">> type="match" text="edit"><$transclude tiddler="$:/core/ui/EditTemplate" /> <$button class="mybuttons" ><$action-deletetiddler $tiddler=<<qualify "TE">>/>Show</$button></$reveal>

I guess another improvement would be to make them system tiddlers (e.g. $:/temp/TE) so that they don't show up in the "recent" list.

On Tuesday, May 12, 2020 at 6:03:11 AM UTC-7, Peter Buyze wrote:
Mark,

I decided to follow your example and use the "TE" transclusion code that allows inline editing of transclusions.

If have noticed that, when I do a transclusion, new tiddlers are formed spontaneously. I have posted 2 of those on my Tiddlyspot site http://peterspottiddly.tiddlyspot.com/

The titles are:

TE-263800324

TE--733562403


Notice also the single and double dashes.

Can these tiddlers be deleted safely? Can they be prevented?

--
Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.

Peter Buyze

unread,
May 12, 2020, 11:41:31 AM5/12/20
to 'Mark S.' via TiddlyWiki
Mark,

I have pasted it into the TE tiddler. I saved, closed and reopened my TW. No success.
I have attached a copy.


12 May 2020, 16:54 by tiddl...@googlegroups.com:
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

TE.tid

Mark S.

unread,
May 12, 2020, 1:04:26 PM5/12/20
to TiddlyWiki
Just tried it on TiddlyWiki.com, and as you can see (there should be a screenshot below) it's working fine.

However, is there any chance you have a class "mybuttons" defined anywhere? With all those plugins, it's possible that more than one of us thought of that same clever class name. Just change "mybuttons" to "xxxbuttons" in the TE template to see if your buttons reappear (remember to close the TE tiddler after changes).

Here's how I defined "mybuttons". My goal was to make the buttons unobtrusive.

button.mybuttons  {
  background
-color: lightgray;
  border
: none;
  color
: white;
  padding
: 1px 1px;
  text
-align: center;
  text
-decoration: none;
  display
: inline-block;
  font
-size: 0.7em;
}









Peter Buyze

unread,
May 13, 2020, 12:46:37 AM5/13/20
to 'Mark S.' via TiddlyWiki
Mark, I tried your alternative code in an empty TiddlyBlink and it works.
I have removed around 5 plug-ins from my active file but that has had no positive effect.

I also disabled Relink and Freelink, but to no avail.

What worries me is that plug-ins and or code that can interfere with one another like that. This time it might be plug-in A that causes the problem, so removing it would resolve the problem. With a next issue it might be plug-in B, which if removed would solve the issue, but then perhaps plug-in A could be put in? We don't know.

This is understandable, but if each time I have to spend hours trying to figure out which code and/or which plug-ins interfere with one another it will not be tenable.

OTOH, many people, like yourself, do use TW successfully for many years: does that mean that more developed coding skills are needed for successful long-term use?


12 May 2020, 20:04 by tiddl...@googlegroups.com:
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages