Hello everyone.
I’m continuing with the programming and I’m stuck again. I think I’m close, but there’s something I’m missing. I’m trying to get the tiddlers that have the “solution” and “Review” labels to display in a certain way. If they don’t have the latter label, they display differently in the view template I created.
I’m using this code, but it doesn’t work:
<$list filter="[all[current]tag[solucion]]">
<$set name="bordeColor" value={{{ [all[current]tag[Revisar]then[rojo]else[negro]] }}}>
<$set name="claseCompleta" value={{{soluciones-cabecera <<bordeColor>>}}}>
<div class=<<claseCompleta>>>
...
</$set>
</$set>
</$list>
Previously, I used this other code, but it didn’t work either:
<$list filter="[all[current]tag[solucion]]">
<$set name="bordeColor" value={{{ [all[current]tag[Revisar]then[-rojo]else[-negro]] }}} />
<div class="soluciones-cabecera<<bordeColor>>">
...
</$set>
</$list>
The associated CSS code is this:
.soluciones-cabecera.rojo{
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border-radius: 0.25rem;
background-color: #f0f0f0;
border: 4px solid red;
}
.soluciones-cabecera.negro{
padding: 0.75rem 1.25rem;
margin-bottom: 1rem;
border-radius: 0.25rem;
background-color: #f0f0f0;
border: 4px solid black;
}
If I directly add the class I want to apply to the tiddler, it displays correctly, but with the code that does what I want, I can’t find the way. What am I forgetting?
Thank you very much.