Hi everyone!
I’m in the process developing my Wiki, and new targets are coming up.
Right now I have a button that create a new tiddler with two differents tags:
- for object’s type
- for domain’s type.
Now, I want to be able, when I selected one of the domain’s type options, instead of creating one tag, it creates two different tags.
For example, if i select the option ThermalResource, it creates two tags: “Heat” and “Water”.
I’m trying to apply [format:titlelist[]join[ ]
within the function f.getTags() only for the text coming from f.tempDomain(), but it’s not working.
Anyone knows how it will be possible to implement that?
I will be very greatfull!
Rosi
\function f.tempTiddler() $:/temp/rosi/new-tiddler-title
\function f.tempObject() $:/temp/rosi/new-tiddler-object
\function f.tempDomain() $:/temp/rosi/new-tiddler-domain
\function f.getNewTitle() [<f.tempTiddler>get[text]trim[]]
\function f.getTags() [<f.tempObject>get[text]] [[<f.tempDomain>get[text]+[format:titlelist[]join[ ]]] +[format:titlelist[]join[ ]]
\procedure deleteTempTiddlers()
<$action-deletetiddler $filter="[prefix[$:/temp/rosi/]]" />
\end
\procedure newTiddlerActions()
<% if [<f.getNewTitle>has[text]] %>
<$action-navigate $to=<<f.getNewTitle>>/>
<%else%>
<$action-createtiddler
$basetitle=<<f.getNewTitle>>
tags=<<f.getTags>>
text="Este es un tiddler con etiqueta"
>
<$action-navigate $to=<<createTiddler-title>>/>
</$action-createtiddler>
<!-- delete all temporary tiddlers -->
<<deleteTempTiddlers>>
<%endif%>
\end
<!-- Campo para introducir el título del nuevo tiddler -->
1. Introduce un título: <$edit-text tiddler=<<f.tempTiddler>> field="text" tag="input" class="tc-edit-textinput"/><br>
- sin espacios.<br>
- empezando cada palabra con mayúsculas<br>
Ej. RiskSources <br>
<!-- Dropdown para seleccionar una etiqueta sobre el tipo de OBJETO-->
2. Elige un tipo de OBJETO:
<$select tiddler=<<f.tempObject>> field="text" default="">
<option disabled>Selecciona una etiqueta</option>
<option value="">-none-</option>
<option value="Costs">Costs</option>
<option value="Issues">Issues</option>
<option value="Parameter">Parameter</option>
<option value="Community">Community</option>
<option value="ManagingEntity">Managing Entity</option>
</$select>
<!-- Dropdown para seleccionar una etiqueta sobre el tipo de DOMINIO -->
3. Elige un tipo de DOMINIO:
<!--<$set name="selected" value={{<<f.tempDomain>>!!text}}> -->
<$select tiddler=<<f.tempDomain>> field="text" default="">
<option disabled>Selecciona una etiqueta</option>
<option value="">-none-</option>
<option value="Regulation">Regulation</option>
<option value="Nature">Envi.& Nature</option>
<option value="Wellness">Wellness</option>
<option value="Heat">Heat</option>
<option value="Water">Water</option>
<option value="HealthSystem">Health System</option>
<option value="[[Heat]] [[Water]]">Thermal Resource (Heat + Water)</option>
<option value="[[Heat]] [[Water]] [[HealthSystem]]">Thermal Therapy</option>
<option value="[[Heat]] [[Water]] [[Wellness]]">Non-Therapy Use</option>
</$select>
<!-- Botón para crear el tiddler con ese nombre -->
4. Presiona el botón
<$button actions=<<newTiddlerActions>> >
Crear nuevo tiddler
</$button> ```