Hi Tobias,

Thanks !
This is a great macro; I like it. I like the fact that only the non-empty 
groups are listed. I feel however limited by the template. I understand 
that it applies only on the item and not the group.

So a bit more on the background of what I am doing:

   - it's a recipe repository, 
   - each recipe has many tags and most tags are categorized (via tags)
      - for example you would get italian recipe , or yiddish , or french 
      etc.. those tags who be tagged with "Origine" (I am french , so the tags 
      are in french)
      - then those recipe would also be categorized by Catégorie (desert, 
      main, starter)
      - and categorized by Qualité (benefits) : cheap, easy ,fast, vegan 
      (some would argue here :-)) etc...
   - I have fields to keep the total time and the preparation time 
   - so I want to display recipe by origine, category and display their 
   benefits

Here is the result (excuse my french ), using the vertical tabs of 
tiddlywiki.com and my macro

<https://lh3.googleusercontent.com/-Ig1a32_52wY/Vfxwbx-xqBI/AAAAAAAAEAE/kmVKdiril-s/s1600/Origin.png>

So I like the display though some categories are not used and still 
displayed
You xlist solve this, but I somehow lose the table , because of the 
category that are not formatted to be in the table

<https://lh3.googleusercontent.com/-29rQ_N_fCEk/VfxxInZZe5I/AAAAAAAAEAM/QGhqyok_UXU/s1600/xlist%2Bresult.png>

Or do you have a solution for this ?

*To summarize my tries. *

   - xlist would need for me to work a lot on template / css to clean the 
   display, but would achieve the best result (please confirm)
   - my macro does the job, but list all categories (I put my macro at the 
   end for reference). The ugly part of the macro is that I need to repete the 
   origin of the recipe. it is not contextual to the tiddler.
   - I could not use the format tag[<Cat>] in my filter list , somehow it 
   is not working (I put the code after the macro, if anything obvious)


*macro used :*

\define CatRecetteTableVTab(Org:Alsace)

*<table>*
*    <tr>*
*       <th>Recette $Org$ </th>*
*       <th>Temps total</th>*
*       <th>Préparation</th>*
*        <th>Qualité</th>*
*    </tr>*
*     <$list  filter="[tags[]sort[title]tag[Catégorie]]" >*
*        <tr><th colspan="4" align="left"><$view field="title"/> </th></tr>*
*        <$list filter="[is[current]tagging[]] +[tag[$Org$]]" >*
*        <tr>*
*            <td><$link to={{!!title}}><$view  field="title"/></$link></td>*
*            <td><$view field="temps_total"/></td>*
*            <td><$view  field="temps_preparation"/> </td>*
*            <td><$list 
filter="[all[current]tags[]tag[Qualité]sort[title]![Recette]]  " 
template="$:/core/ui/TagTemplate" /></td>*
*       </tr>*
*   </$list>*
*</$list>*
*</table>*


\end

*The code that failed :*

*<table>*
*    <tr>*
*       <th>Recette</th>*
*       <th>Temps total</th>*
*       <th>Préparation</th>*
*        <th>Qualité</th>*
*    </tr>*
*     <$list  filter="[tags[]sort[title]tag[Catégorie]]" variable=Cat >*
*        <tr><th colspan="4" align="left"><$view tiddler=<<Cat>> 
field="title"/> </th></tr>*
*        <$list filter="[is[current]tagging[]] +[tag[<Cat>]]" 
 variable=Rec>*
*        <tr>*
*            <td><$link to={{!!title}}><$view tiddler=<<Rec>> 
field="title"/></$link></td>*
*            <td><$view tiddler=<<Rec>> field="temps_total"/></td>*
*            <td><$view tiddler=<<Rec>>  field="temps_preparation"/> </td>*
*            <td><$list 
filter="[all[current]tags[]tag[Qualité]sort[title]![Recette]]  " 
template="$:/core/ui/TagTemplate" /></td>*
*       </tr>*
*   </$list>*
*</$list>*
*</table>*

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/caa91156-5948-4cc9-a882-5b9acf2db000%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to