Shiraz 3.0: Plan for the Next Major Release

I saw that, but it’s still not what I’m looking for :sweat_smile:

Everywhere in the templates, <<currentColumn>> is called, including in the default header template $:/plugins/kookma/shiraz/tables/templates/header/default:

<th>
<%if [<tempTableSort>getindex[sortIndex]match<currentColumn>] %><!--if table is sorted based on current column -->
	<%if [<tempTableSort>getindex[hasnegate]match[false]] %><!--set negate for sort-->
		<$button setTitle=<<tempTableSort>> setIndex="hasnegate" setTo="true" class="tbl-sort-svg tc-btn-invisible tc-tiddlylink" >
			<$action-setfield $tiddler=<<tempTableSort>> $index="sortFlag" $value="reverse,caseinsensitive"/>
			<$text text=<<currentColumn>>/>&nbsp;{{$:/core/images/down-arrow}}
		</$button>
	<%elseif [<tempTableSort>getindex[hasnegate]match[true]] %><!--remove negate for sort-->
		<$button setTitle=<<tempTableSort>> setIndex="hasnegate" setTo="false" class="tbl-sort-svg tc-btn-invisible tc-tiddlylink" >
			<$action-setfield $tiddler=<<tempTableSort>> $index="sortFlag" $value=""/>
			<$text text=<<currentColumn>>/>&nbsp;{{$:/core/images/up-arrow}}
		</$button>
	<%endif%><!-- end of nested if: set negate -->
<%else%><!--if table is not sorted based on current column -->
	<$button setTitle=<<tempTableSort>> setIndex="sortIndex" setTo=<<currentColumn>> class="tc-btn-invisible tc-tiddlylink" >
		<$action-setfield $tiddler=<<tempTableSort>> $index="hasnegate" $value="false"/>
		<$action-setfield $tiddler=<<tempTableSort>> $index="sortFlag" $value=""/>
		<$text text=<<currentColumn>>/>
	</$button>
<%endif%>
</th>

Where is <<currentColumn>> defined?

It’s a <$list> widget variable in $:/plugins/kookma/shiraz/macros/dtables/table-dynamic:

...


<!-- create header -------------------->
<thead>
<<confirm-delete>>
<<check_tiddlers_type_for_table_from_indexes>>
<tr class="shiraz-dtable-header">
<$list filter=<<columnFilter>> variable=currentColumn>

...

Fred

2 Likes

Thanks! Now I know that I’ll need to operate around the currentColumn rather than in it :stuck_out_tongue_winking_eye:

There is no formatting here! Plain text is produced using <$text text=<<currentColumn>>/>.
CSS is responsible for formatting. The link to style tiddler is given above.

Hello again :slight_smile: I noticed that for dynamic tables, you reference an parameter called “filed” often in examples like in demo/dynamic-tables/searchable where you create a temp tiddler to store the contents of a search input:

<$edit-text tiddler="$:/temp/demo/dtable/search" filed=text tag=input default=""/>

I’ve used a lot of your dynamic tables in my TW, and they work perfectly, but I’m curious as to whether or not this is supposed to be “field” instead of “filed” since for the example above, the edit-text widget doesn’t have a filed parameter? I’m thinking that since “filed” is not a parameter of the widget, it’s simply ignored, and the widget defaults to using the text field of the state Tiddler, so it still works, but I’d love to make sure :slight_smile:

Ah, I remember serval other places @TW_Tones and @TiddlyTweeter.
You are right, that is a misspelled word, I correct it!

1 Like

This will function as expected, despite the incorrect parameter. The reason is that if the field is not provided, the text field will be used as the default.

Yes that’s what I meant when I wrote

:slight_smile: