Titel aus Eingabefeldern generieren / title from Inputfields

67 views
Skip to first unread message

Gerald Weis

unread,
Jan 22, 2020, 3:25:07 AM1/22/20
to tiddl...@googlegroups.com
Hallo Leute,

ich habe folgendes Problem:
Ich möchte den Titel von Tiddlern aus Eingabefeldern zusammenstellen lassen, da die Reihenfolge der Angaben immer gleich ist.
Der Titel des Tiddler soll folgende Struktur haben

Nr. Feldname                   Feldinhalt
1.      Distributionsname:  UBUNTU
2.   Distributionsversion:  19.04
3.                  Architektur: 64
4.                         Quelle:  LINUX User 2019/12
5.                       DVD-Nr.: 38

die Eingabe ins Titelfeld:

{{!!Distributionsname}} {{!!Distributionsversion}} --- {{!!Architektur}} Bit --- Heft: {{!!Quelle}} --- DVD-Nr. {{!!DVD-Nr.}}

funktioniert leider nicht.

Wie bringe ich einen Titel mit dieser Struktur ins Titelfeld?

Danke

Hello Guys,

i have the follow Problem: I want create the title of Tiddlers from Inputfields. The Order of fiels ist everytime equal.
The tiddler must have this stucture:

No. Fieldname                  Fieldcontent
1.      Distributionsname:  UBUNTU
2.   Distributionsversion:  19.04
3.                  Architektur: 64
4.                     resource:  LINUX User 2019/12
5.             DVD-Number.: 38

the input in the tiddlertitle:

{{!!Distributionsname}} {{!!Distributionsversion}} --- {{!!Architektur}} Bit --- Heft: {{!!Quelle}} --- DVD-Nr. {{!!DVD-Nr.}}

do not work.

How can i do it that the tiddlertile with this structure come in

thanks

Danke

Update:
Ich habe jetzt etwas eiter experimentiert und habe mein Ergebnis, das ebenfalls nicht so funktioniert wie ich es gerne hätte, mal angehängt

Bildschirmfoto vom 2020-01-22 13-35-35.png

Mark S.

unread,
Jan 22, 2020, 10:12:40 AM1/22/20
to tiddl...@googlegroups.com

The title field is special. It must be unique within TiddlyWiki. It can not be generated dynamically.

But you can display a generated title wherever needed

Make a tiddler and tag it $:/tags/ViewTemplate

with content

<$list filter="[all[current]has[Distributionsname]]">

{{!!Distributionsname}} {{!!Distributionsversion}} --- {{!!Architektur}} Bit --- Heft: {{!!Quelle}} --- DVD-Nr. {{!!DVD-Nr.}}
</$list>

This can be moved to the top, if needed.

You can then perhaps use CSS to hide the real title if desired.

The other way to do this is to hack the tiddler $:/core/ui/ViewTemplate/title so that it displays a generated title as you want (though the actual title must stay the same).
But this is not a good thing to do, because it may interfer with TW upgrades and with getting help from the TW community.

Good luck!

Gerald Weis

unread,
Jan 25, 2020, 3:28:29 PM1/25/20
to TiddlyWiki
Hallo Leute

ich habe es jetzt etwas anders gelöst

in dem zu scrheibenden Tiddler mach ich nur den Eintrag
<<titelmakro>>
und fülle die Datenfelder aus.

ich habe ein Makro erstellt das wie folgt ausieht:


\define titelmakro()
<!-- Tabelle -->
|''Beschreibung''|''Info''|h
| ''Distributionsname:''|{{!!10_distribution_name}} ''Version:'' {{!!20_distribution_versionsnr}} |
| ''Architektur:''|{{!!30_anzahl_bit}} |
| ''Quelle:''|{{!!40_quelle}} |
| ''DVD-Nr.:''|{{!!50_dvd-nr}} |
<!-- Fußzeile -->
|^{{Kürzel für LINUX-Quellen-Print}}|^{{Kürzel für LINUX-Quellen-Internet}}|f

<!-- Zeile für den Titel -->>
{{!!10_distribution_name}} {{!!20_distribution_versionsnr}} -- {{!!30_anzahl_bit}} Bit -- von: {{!!40_quelle}} -- DVD: {{!!50_dvd-nr}}
\end

Dieses Makro tut mehrere Dinge

1. erstellt es die Tabelle
2. werden 2 Artikel in die Fußzeile der Tabelle transcludiert
2.1 Kürzel für LINUX-Quellen-Print - enthällt alle Quellen aus Printmedien und die Kürzel dazu
2.1 Kürzel für LINUX-Quellen-Internet - enthält alle Online-Quellen und Kürzel dazu
3. Der Inhalt der Zeile für den Titel wird als unterste Zeile im Tiddler dargestellt.

Diese Zeile wird  händisch dann kopiert und in den Titel eingefügt.
Reply all
Reply to author
Forward
0 new messages