Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
don't understand datatiddlerplugin
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
RV  
View profile  
 More options Oct 31 2012, 11:15 am
From: RV <rens.vingerho...@gmail.com>
Date: Wed, 31 Oct 2012 08:15:15 -0700 (PDT)
Local: Wed, Oct 31 2012 11:15 am
Subject: don't understand datatiddlerplugin

Hi guys,

I am setting up some sort of documentmanagementsystem using tiddlywiki and
I am quite satisfied with what I have this far.
However, I would like to make a list of al tiddlers with a certain tag and
their expiry date. For now I used foreachtiddlerplugin to generate a list
of the tiddlers and their modified date, which is a substitute for their
expiry date. Yet, I prefer to use an expiry date and would like to attach
this to the tiddler using the datatiddlerplugin.

Probably I am a fool, but i don't understand how to do this.

For a given tiddler (test)I tried this:

<<t.setData("expdate","30-10-2014")


But then I get the message: Error in macro
<<t.setData("expdate","30-10-2014")>>

What am I doing wrong? The plugin appears to be loaded correctly.

Cheers,
Rens


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
whatever  
View profile  
 More options Oct 31 2012, 3:20 pm
From: whatever <kbrezov...@gmail.com>
Date: Wed, 31 Oct 2012 12:20:24 -0700 (PDT)
Local: Wed, Oct 31 2012 3:20 pm
Subject: Re: don't understand datatiddlerplugin
Hi!
If I'm not mistaken, you need the FormTiddlerPlugin to enter data.
Also, the reason you're getting the error is that t.setData isn't a
macro. Look at the site where you got the DataTiddlerPlugin for
examples.

w

On Oct 31, 4:15 pm, RV <rens.vingerho...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RV  
View profile  
 More options Oct 31 2012, 3:46 pm
From: RV <rens.vingerho...@gmail.com>
Date: Wed, 31 Oct 2012 12:46:32 -0700 (PDT)
Local: Wed, Oct 31 2012 3:46 pm
Subject: Re: don't understand datatiddlerplugin

Well the part about the examples is actually the problem. I got the plugin
from this site:
http://tiddlywiki.abego-software.de/

And what I typed is more or less literally the example on how to "Set the
value of the given data field of the tiddler to the value. When the value is
undefined the field is removed."

Op woensdag 31 oktober 2012 20:20:29 UTC+1 schreef whatever het volgende:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric Shulman  
View profile  
 More options Oct 31 2012, 3:50 pm
From: Eric Shulman <elsdes...@gmail.com>
Date: Wed, 31 Oct 2012 12:50:47 -0700 (PDT)
Local: Wed, Oct 31 2012 3:50 pm
Subject: Re: don't understand datatiddlerplugin

> However, I would like to make a list of al tiddlers with a certain tag and
> their expiry date. For now I used foreachtiddlerplugin to generate a list
> of the tiddlers and their modified date, which is a substitute for their
> expiry date. Yet, I prefer to use an expiry date and would like to attach
> this to the tiddler using the datatiddlerplugin.

You can add custom fields to tiddlers without using any plugins at
all.

First, you need a way to enter the field....

To do this, you modify the [[EditTemplate]] to define a text input for
your custom field:
      <div class='editor' macro='edit expirationdate'></div>
You can place the input field anywhere you like in the template.  In
this case, I put it following the normal multi-line text input, like
this:
-----------------------
<!--{{{-->
<div class='toolbar' macro='toolbar
[[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit expirationdate'></div>
<div class='editor' macro='edit tags'></div><div
class='editorFooter'><span macro='message views.editor.tagPrompt'></
span><span macro='tagChooser excludeLists'></span></div>
<!--}}}-->
-----------------------
Note: custom field names must be ALL LOWER CASE for the TWCore to
properly access them.

NEXT... you will probably want to be able to view the expiration date
when you *display* the tiddler.  To do this, modify the
[[ViewTemplate]] by adding this line:
   <div macro='view expirationdate'></div>
As with the EditTemplate change, you can place the field display
anywhere you like in the template.  In this case, I put it in the
subtitle, following the normal modified/created date displays, and
included a bit of text surrounding it, like this:
   (expires on: <span macro='view expirationdate'></span>)
----------------------
<!--{{{-->
<div class='toolbar' role='navigation' macro='toolbar
[[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span
macro='view modified date'></span> (<span macro='message
views.wikified.createdPrompt'></span> <span macro='view created
date'></span>)
(expires on: <span macro='view expirationdate'></span>)
</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
----------------------

Finally, and most important for your use-case... you will want to
access this field from within the <<forEachTiddler>> macro that you
are invoking.  Within the fET context, you can reference the custom
fields of the current tiddler object by writing something like:
   tiddler.fields['expirationdate']

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric Shulman  
View profile  
 More options Oct 31 2012, 4:02 pm
From: Eric Shulman <elsdes...@gmail.com>
Date: Wed, 31 Oct 2012 13:02:42 -0700 (PDT)
Local: Wed, Oct 31 2012 4:02 pm
Subject: Re: don't understand datatiddlerplugin
On Oct 31, 12:46 pm, RV <rens.vingerho...@gmail.com> wrote:

> Well the part about the examples is actually the problem. I got the plugin
> from this site:http://tiddlywiki.abego-software.de/

> And what I typed is more or less literally the example on how to "Set the
> value of the given data field of the tiddler to the value. When the value is
> undefined the field is removed."

Note in the summary for DataTiddlerPlugin, it says:
   ...accessed and modified through named fields (in JavaScript
code)....

The examples that follow are Javascript... not macros.  They are
intended to be used in the context of a forEachTiddler macro, or when
writing plugins or inline scripts (using my InlineJavascriptPlugin).
Something like this:

<script>
   var t=store.getTiddler('NameOfTiddler');
   t.setData(field,value);
</script>

OR, using the alternative "DataTiddler" methods (see DataTiddlerPlugin
documentation):

<script>
   DataTiddler.setData('NameOfTiddler',field,value)
</script>

In any case, this may all be moot if you decide to use my alternative
non-plugin native TWCore template method for defining and accessing
custom fields.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RV  
View profile  
 More options Nov 2 2012, 11:04 am
From: RV <rens.vingerho...@gmail.com>
Date: Fri, 2 Nov 2012 08:04:33 -0700 (PDT)
Local: Fri, Nov 2 2012 11:04 am
Subject: Re: don't understand datatiddlerplugin

Hi Eric,

this is indeed easier than using the datatiddlerplugin. It works perfect!

Thanks,
Rens

Op woensdag 31 oktober 2012 20:50:53 UTC+1 schreef Eric Shulman het
volgende:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »