This is a stripped-down version of a single section of Grok TiddlyWiki, optimized for fast loading and readability by search engines. Some features are missing.

For the full Grok TiddlyWiki experience, please visit the wiki version of this page.

Ex:SaveOptionalParameters/answer

 1st September 2024 at 9:58am

Here's one possible version:

\function .rest-names() [<params-var>jsonindexes[]]
\function .rest-values() [.rest-names[]] :map[<params-var>jsonget<currentTiddler>]

\widget $link()
  <$parameters
    to=""
    tooltip=""
    $params="params-var"
  >
    <$let newtooltip={{{ [<tooltip>!is[blank]] ~[<to>get[description]] }}}>
      <$genesis
        $type="$link"
        $remappable="no"
        $names="[.rest-names[]] =tooltip"
        $values="[.rest-values[]] =[<newtooltip>]"
      >
        <$slot $name="ts-raw"/>
      </$genesis>
    </$let>
  </$parameters>
\end

[[Links]] and <$link to=Tags tooltip="I love tags!">Tags</$link> combine to organize [[Tiddlers]] within a wiki.

Here's an example of a link using a parameter we didn't touch, `class`, which gets saved correctly:

<$link to="Fields" class="tc-tiddlylink-external">I'm posing as external</$link>

Links and Tags combine to organize Tiddlers within a wiki.

Here's an example of a link using a parameter we didn't touch, class, which gets saved correctly:

I'm posing as external

Go to question: Ex:SaveOptionalParameters