On Thu, Dec 18, 2008 at 6:11 PM, Dante <[email protected]> wrote:
>
> The ultimate goal is to make a lab journal. I'd like to use the
> calendar to select a day of the month and see the tasks I completed on
> that day.
If you organize your pages like tasks.2008.12.25 you can very easily
sort them and such. You can also convert them to timestamps, etc. For
example on a page like the above you could do this:
[(time '{p3}/{p4}/{p2}' '%B %d, %Y')]
And get December 25, 2008. Kind of cool.
> For now, if someone could just show me how to display the full name of
> the month using the data obtained from a form I can trudge on a bit
> from there...
>
> I adapted a form to select a month and year:
> ---------------------------
> [form]
> Select date: [select calYear default='{:calYear}']
> [option '2008']2008
> [option '2009']2009
> [select][select calMonth default='{:calMonth}']
> [option '1']Jan
> [option '2']Feb
> [select]
> [select][(search group=snippets template=select)][submit]
> [session savedata calMonth,calYear]
> [form]
>
> /*
> newTime: [(time mktime(0, 0, 0, {:calMonth}, 1, {:calYear}) "%B")]
> */
>
> The month is {::newTime}
> ----------------------------
>
> Result is - The month is 0,
Time has no clue what to do with mktime. So you won't get any decent
results like this.
Why not just do this:
[form]
Select date: [select Year default='{:calYear}']
[option '2008']2008
[option '2009']2009
[select][select Month default='{:calMonth}']
[option 'January']January
[option 'February']February
[select]
[submit]
[session savedata Month,Year]
[form]
The month is {:Month}, {:Year}.
{::var} is an info var (2 colons). Retrieved from lines like field:
value in the page content.
{:var} is a data var (1 colon). Stored invisibly on a page using the
savedata command
{var} is a system var (0 colons). Set by BoltWire or a config file
Depending on how you want to display your data and all, there may be
better ways to accomplish what you want. Are you going to have each
page a task, and then assign it a data (perhaps changeable) so you can
retrieve certain tasks?
If you want multiple pages for tasks all on the same date you could
use a page naming technique like
tasks.2008.12.25.1000, tasks.2008.12.25.1001, etc (threads, easily automated)
Then for Decembers tasks, just do
[(search group=tasks.2008.12*)]
Lot's of possibilities. Just depends on what you want.
Cheers,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---