Hi, Andreas.
Your post actually gave me just the right nudge to figure out the problem.
Here is the code that ended up working. I am using Skeeve's newtiddler
plugin.
<$set name="proj_owner" value={{$:/status/UserName}}>
<$set name="proj_start_date" value=<<now YYYY-0MM-0DD>>>
<$newtiddler title="New Project"
skeleton="$:/plugins/kurt/projects/template/project">New
Project</$newtiddler>
</$set></$set>
Then in my project template, I have proj_owner and proj_start_date fields
set to $(proj_owner)$ and $(proj_start_date)$, respectively.
To be honest, I still am not 100% sure what I was doing wrong. I would have
sworn I tried the above approach, but apparently not. At any rate, it works
now, so I am happy.
Thanks for your help.
--Kurt
On Sunday, May 3, 2015 at 3:49:59 AM UTC-5, Andreas Hahn wrote:
>
> Hi Kurt,
>
> can you post the full code involved in creating the new tiddler ? As far
> as I can tell
>
> <$set name="proj_owner" value={{$:/status/UserName}}>
> <<proj_owner>>
> </$set>
>
> correctly sets the proj_owner variable to the username, whereas your macro
> approach does not (the result of the macro is not treated as WikiText
> <http://tiddlywiki.com/#WikiText>).
>
> /Andreas
>
> Am 03.05.2015 um 02:40 schrieb Kurt Kincaid:
>
> I think (hope?) that this is an easy issue that I am just missing.
>
> I am relatively new to TW5 (I was an old school user of pre-TW5), and I am
> having a problem with transclusion. I have a button to create a new
> tiddler, and I want to insert the current user from $:/status/UserName into
> a field in the new tiddler called "proj_owner". I tried simply including
> the content of the $:/status/UserName tiddler like this:
>
> <$set name="proj_owner" value={{$:/status/UserName}}>
>
> However, the new tiddler contains "{{$:/status/UserName}}" in the
> proj_owner field, rather that the actual value. I even tried creating a
> macro to see if that would help me:
>
> \define whoami(who:{{$:/status/UserName}}) $who$
>
> And then modifying the $set code like this:
>
> <$set name="proj_owner" value=<<whoami>>>
>
> But that yields the same result. I have been driving myself crazy with
> different permutations to figure this out, but it keeps eluding me. Any
> pointers or ideas would be greatly appreciated.
>
> Thanks in advance.
>
> Kurt
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected]
> <javascript:>.
> Visit this group at http://groups.google.com/group/tiddlywikidev.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywikidev/83af6e63-70ef-4e2a-94bd-5d7d02c47509%40googlegroups.com
>
> <https://groups.google.com/d/msgid/tiddlywikidev/83af6e63-70ef-4e2a-94bd-5d7d02c47509%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywikidev/5eca7cc8-58a8-4c53-9464-98567cb51d86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.