Hi all,
I’m having a small issue with a macro that I’ve written that I cannot figure out (code below).
This macro is to create a tiddler representing a newspaper article. I have several edit-text widgets for inputs and a button to create the tiddler. Everything works fine with the only exception being the title of the tiddler.
For example, in trying to create an article for the Las Animas, Colorado Leader for Friday, June 4, 1875, page 2, I get for the title
(1875-06-04)
instead of what I intend which is
Las Animas, Colorado Leader, Friday, 1875-06-04, page 4
The description field works just fine and if I change the name of the new tiddler to the description it works just fine. There’s something about the new tiddler title that I’m tyring to create that isn’t working right and I can’t quite figure out what it is. It’s probably pretty obvious and maybe I’ve stared at it too long.
Any help would be greatly appreciated. Thanks in advance.
\define newtitle(newspaper,weekday,date,page)
$newspaper$, $weekday$, $date$, page $page$
\end
\define newdescription(newspaper,state,city,newspaper,date,page)
Newspapers-$state$-$city$-$newspaper$-$date$-pg$page$
\end
\define NewNewspaper()
<$vars
temp="$:/temp/volatile/NewNewsEntry">
Date of Article: <$edit-text
tiddler=<<temp>>
field=date
class=fieldinput
tag=input
size=12
placeholder="yyyy-mm-dd"
/>
Day of the Week: <$edit-text
tiddler=<<temp>>
field=weekday
class=fieldinput
tag=input
size=8
/>
<p/>
State Newspaper Resides: <$edit-text
tiddler=<<temp>>
field=state
class=fieldinput
tag=input
size=24
/>
<p/>
City Newspaper Published: <$edit-text
tiddler=<<temp>>
field=city
class=fieldinput
tag=input
size=72
/>
<p/>
Name of Newspaper: <$edit-text
tiddler=<<temp>>
field=newspaper
class=fieldinput
tag=input
size=72
/>
<p/>
Page of Newspaper (# only): <$edit-text
tiddler=<<temp>>
field=page
class=fieldinput
tag=input
size=8
/>
<p/>
Text of Article:
<$edit-text
tiddler=<<temp>>
field=article
class=fieldarea
tag=textarea
placeholder="Enter transcription of article (accepts HTML formatting)."
/>
<p/>
<$button tooltip="save input" > {{$:/core/images/new-button}} Add New Newspaper
<$vars
date={{{ [title<temp>get[date]] }}}
weekday={{{ [title<temp>get[weekday]] }}}
state={{{ [title<temp>get[state]] }}}
city={{{ [title<temp>get[city]] }}}
newspaper={{{ [title<temp>get[newspaper]] }}}
page={{{ [title<temp>get[page]] }}}
article={{{ [title<temp>get[article]] }}}
>
<$wikify name=tidname text="""<$macrocall $name=newtitle newspaper=<<newspaper>> weekday=<<weekday>> date=<<date>> page=<<page>> />""">
<$wikify name=description text="""<$macrocall $name=newdescription newspaper=<<newspaper>> state=<<state>> city=<<city>> date=<<date>> page=<<page>> />""">
<$action-createtiddler
$basetitle=<<tidname>>
date=<<date>>
state=<<state>>
city=<<city>>
newspaper=<<newspaper>>
page=<<page>>
text=<<article>>
description=<<description>>
/>
</$wikify>
</$wikify>
</$vars>
<$action-deletetiddler $filter="[<temp>]" />
</$button>
<$button tooltip="cancel input"> {{$:/core/images/cancel-button}} Clear Entries
<$action-deletetiddler $filter="[<temp>]" />
</$button>
</$vars>
\end