edit current section

61 views
Skip to first unread message

Dave

unread,
Jun 9, 2012, 1:09:40 AM6/9/12
to tiddl...@googlegroups.com
Hi,

Using Eric's wonderful EditSectionsPlugin, you can put something like this into a section

<<editSection [[TiddlerName##Section Name]] edit 'click to edit this section'>>

and you can edit just that section rather than opening up the whole tiddler.


What I was wondering if there was some programmatic way to have the same thing plunked into every section and have it read its own section name... Something like this:
<<editSection {{this.tiddler##this.section}} edit 'click to edit this section'>>

-fingers crossed,
Dave


Måns

unread,
Jun 9, 2012, 2:16:16 PM6/9/12
to TiddlyWiki
Hi Dave

> What I was wondering if there was some programmatic way to have the same
> thing plunked into every section and have it read its own section name...
> Something like this:
> <<editSection {{this.tiddler##this.section}} edit 'click to edit this
> section'>>

There's a little workaround which will help you get a toc of all
already existing sections + an edit section button for each section:

First install Eric's SectionLinksPlugin http://www.tiddlytools.com/#SectionLinksPlugin
then you can change the <<SectionTOC>> output link format by adding
the following statement to a tiddler tagged with systemConfig:
config.macros.sectionTOC.linkFormat='[[%0|##%0]]';
The default value (shown above) produces a link to each section within
the tiddler, using "%0" to insert the section name into the link.

You can add extra formatting to generate additional output to suit
your purposes. For example, if you have EditSectionPlugin installed,
you could include a link that invokes that plugin's popup editor
directly from each item in the TOC display, like this:
config.macros.sectionTOC.linkFormat='[[%0|##%0]] <<editSection [[##
%0]] [[(edit)]]>>';

(Citation copied from SectionLinksPlugin##Configuration - Read more
about SectionLinksPlugin in the plugin doc sections)

Cheers Måns Mårtensson

Dave

unread,
Jun 9, 2012, 3:59:41 PM6/9/12
to tiddl...@googlegroups.com
Hi Mans, thank you for that... after some reading and tweaking I think I have something that is close to what I wanted: http://biblematrix.tiddlyspace.com/#%5B%5BJohn%201%5D%5D

Ideally I wanted an edit button embedded in each section like I have the old fashioned way in the first few sections, but this works pretty well.

I know this is a it of a google group faux-pa, but do you see how when you click the "read" button for each section the pop-up appears way down the page?  Do you know off hand how to fix that?  If not I'll post it as a separate thread... thanks
-Dave

Dave

unread,
Jun 9, 2012, 4:08:47 PM6/9/12
to tiddl...@googlegroups.com
oops, just realized I have a bunch of aliases that aren't loaded when you use a permalink to a single tiddler.  If you find all the error messages distracting, just go here: 
http://biblematrix.tiddlyspace.com/ and select "John 1" in the tagging under StartHere

Eric Shulman

unread,
Jun 9, 2012, 6:34:02 PM6/9/12
to TiddlyWiki
> Using Eric's wonderful EditSectionsPlugin, you can put something like this
> into a section
>
> <<editSection [[TiddlerName##Section Name]] edit 'click to edit this
> section'>>
>
> and you can edit just that section rather than opening up the whole tiddler.
>
> What I was wondering if there was some programmatic way to have the same
> thing plunked into every section and have it read its own section name...

<<editSections "label" "tooltip">>

Add to the end of the tiddler content to automatically add an 'edit
section' link to each heading.

-e

Dave

unread,
Jun 10, 2012, 2:28:43 PM6/10/12
to tiddl...@googlegroups.com
Thank you Eric, and also thank you for not reminding me to read the fabulous manual (I've just reminded myself {reading diligence is not one of my virtues :-\  })  And to boot, "editSections" at the end even makes perfect sense.

I am still glad I asked, because otherwise I'd never have know about Mans cool trick, which I think I'll still make use of. (thanks again Mans)
Reply all
Reply to author
Forward
0 new messages