Question about <<list-link>> macro

I am just starting to work with lists and finally figured out how to get them to work.

The Days of the Week tiddler uses this macro:

<<list-links "[list[]]">>

In this case, it lists everything in the “list” field.

I was wondering if there was a way to use wikitext instead of a field, like this:

<<list-links
*Monday
*Tuesday
*Wednesday
*Thursday
*Friday
*Saturday
*Sunday
>>

I have an extensive list and would prefer this format.

I am not exactly sure what you are asking here;

Here are hard coded links

*[[Monday]]
*[[Tuesday]]
*[[Wednesday]]
*[[Thursday]]
*[[Friday]]
*[[Saturday]]
*[[Sunday]]

Or you could do this with the list widget, my preferred way of using lists.

<$list filter="Monday Tuesday Wednesday Thursday Friday Saturday Sunday">

</$list>

or

<$list filter="Monday Tuesday Wednesday Thursday Friday Saturday Sunday">
  <li><$link/></li>
</$list>

Keep in mind list-links is a macro designed for a purpose; where widget such as the list widget is core tiddlywiki functionality.

Perhaps you can outline what you want to do and I can give a more definitive answer.

Do you know how macros work? The macros can be more complex that widgets and wikitext, because they can wrap widgets and wikitext. The macros are smart templates what they can use parameters. So the macros, as templates, can be expect especific kind of parameter to work.

In the example you see the macro with the first parameter which is a filter, you can use other filter. For example the basics filter that you are thinking:

<<list-links "Monday Tuesday Wednesday Thursday Friday Saturday Sunday">>

Which could be rewritten as:

<<list-links """
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday""">>

Thanks, I knew it had to be that simple.
I wasn’t sure if was <<list-links """...""">> or <<list-links text="...">> or some other combination.

Since list-inks is a macro <<list-links As documented here as a result parameters are either positional eg the first is the filter parameter or you need to name them, unlike widgets we need to use the colon “:” rather than equal “=”.

<<list-links filter:"...">>

You can see this macro defined in ## $:/core/macros/list
the parameters and default values;

\define list-links(filter,type:"ul",subtype:"li",class:"",emptyMessage)
\whitespace trim
<$type$ class="$class$">
<$list filter="$filter$" emptyMessage=<<__emptyMessage__>>>
<$subtype$>
<$link to={{!!title}}>
<$transclude field="caption">
<$view field="title"/>
</$transclude>
</$link>
</$subtype$>
</$list>
</$type$>
\end

You can learn a lot about making macros or using wiki text looking at the provided core macros. Here is the above simplified for use directly in wikitext.

<ul>
<$list filter=".." emptyMessage="empty">
<li>
<$link to={{!!title}}>
<$transclude field="caption"><!-- use caption as link name OR title -->
<$view field="title"/>
</$transclude>
</$link>
</li>
</$list>
</ul>