From bauhaus at metaperl.com Sat Dec 11 00:32:54 2004
From: bauhaus at metaperl.com (Terrence Brannon)
Date: Sat Dec 11 08:00:00 2004
Subject: [Petal] table rows using alternating style info?
Message-ID: <6mzn0lisi1.fsf@Abulafia.hcoop.net>
Hi, I glanced through the Petal docs and am very impressed - it puts
my HTML::Seamstress to shame.
I did not see an example of how to make alternating table rows using
different style information (usually the variation is background
color).
Could someone show how that is done in Petal.
Regards
From chris at webarchitects.co.uk Sat Dec 11 17:45:58 2004
From: chris at webarchitects.co.uk (Chris Croome)
Date: Sat Dec 11 17:46:00 2004
Subject: [Petal] table rows using alternating style info?
In-Reply-To: <6mzn0lisi1.fsf@Abulafia.hcoop.net>
References: <6mzn0lisi1.fsf@Abulafia.hcoop.net>
Message-ID: <20041211174558.GA5368@webarchitects.co.uk>
Hi
On Sat 11-Dec-2004 at 12:32:54AM +0000, Terrence Brannon wrote:
>
> I did not see an example of how to make alternating table rows using
> different style information (usually the variation is background
> color).
>
> Could someone show how that is done in Petal.
I set this up the other day for some tables in MKDoc 1.8 (we must
set up viewcvs or something...), this is a extract from the
audience_list template, it's basically a matter of repeating the
row, this has the advantage that when you view the file in a browser
or WYSIWYG editor you get to see two different rows, one thing that
I don't know how to avoid is the ugly div that has to be omitted:
This example should be added to Petal POD -- there isn't an example
like this documented anywhere.
Chris
--
Chris Croome
web design http://www.webarchitects.co.uk/
web content management http://mkdoc.com/
From bauhaus at metaperl.com Sun Dec 12 03:01:29 2004
From: bauhaus at metaperl.com (Terrence Brannon)
Date: Sun Dec 12 03:01:22 2004
Subject: [Petal] Re: help for cpan modules etc..
References: <414B0FDA.5080306@theseamans.net>
<46095260-0BCD-11D9-9A14-000A95AC67AA@messagelabs.com>
<20040921131746.GB25688@webarchitects.co.uk>
<5823134A-0CE0-11D9-AC43-000A95E071BA@multimap.com>
<20041007070759.GA6637@wardley.org>
<47605B4D-187B-11D9-8297-000A95E071BA@multimap.com>
Message-ID: <6mwtvo5ieu.fsf@Abulafia.hcoop.net>
Steve Purkis writes:
> On Oct 7, 2004, at 08:07, Andy Wardley wrote:
>
>> Steve Purkis wrote:
>>> Perhaps we'll finally see Petal & TT2 [3?] working together...
Help me out here. If I'm developing a website, Imight have XHTML
templates on disk and my view, controller amd model logic written in
Perl. As tt2 is a tool for view logic, it seems to be an alternative for
petal, not something that would work with it.
I'm sure that there are entire websites developed with MkDoc that did
not use/need tt2 at all...
From spurkis at quiup.com Mon Dec 13 10:29:25 2004
From: spurkis at quiup.com (Steve Purkis)
Date: Mon Dec 13 10:30:32 2004
Subject: [Petal] Re: help for cpan modules etc..
In-Reply-To: <6mwtvo5ieu.fsf@Abulafia.hcoop.net>
References: <414B0FDA.5080306@theseamans.net>
<46095260-0BCD-11D9-9A14-000A95AC67AA@messagelabs.com>
<20040921131746.GB25688@webarchitects.co.uk>
<5823134A-0CE0-11D9-AC43-000A95E071BA@multimap.com>
<20041007070759.GA6637@wardley.org>
<47605B4D-187B-11D9-8297-000A95E071BA@multimap.com>
<6mwtvo5ieu.fsf@Abulafia.hcoop.net>
Message-ID:
On Dec 12, 2004, at 03:01, Terrence Brannon wrote:
> Steve Purkis writes:
>
>> On Oct 7, 2004, at 08:07, Andy Wardley wrote:
>>
>>> Steve Purkis wrote:
>>>> Perhaps we'll finally see Petal & TT2 [3?] working together...
>
> Help me out here. If I'm developing a website, Imight have XHTML
> templates on disk and my view, controller amd model logic written in
> Perl. As tt2 is a tool for view logic, it seems to be an alternative
> for
> petal, not something that would work with it.
At the moment, it is an alternative. That's the problem, IMHO.
The thing is, they are both templating systems -- they both parse
templates, create cached copies of them, and render them. They even
have a similar invocation syntax.
From the user's POV, the only thing that differs is the syntax. In an
ideal world, Petal would just be a flavour of TT3, which from my
understanding, is simply an engine for writing templating systems that
have different syntax. So the idea is: share the common foundation,
and keep the different template languages.
The idea is this kind of engineering change would be transparent to
users - they wouldn't realize or even care that they're using the TT3
engine. But they'd benefit from it's features (f.e: better template
debugging hooks). And the engineers would have less code to maintain -
definitely a good thing.
BTW, Andy Wardley has just released an alpha of TT3:
http://tt3.template-toolkit.org/
If anyone has time to start working with Andy with a view to
integrating Petal into TT3, I'm sure the community would appreciate it.
(I'm snowed in at work, otherwise I'd volunteer :-/)
> I'm sure that there are entire websites developed with MkDoc that did
> not use/need tt2 at all...
Yes, that's true. But hopefully the above explains why this isn't
really an issue.
-Steve
From william at knowmad.com Tue Dec 14 14:22:31 2004
From: william at knowmad.com (William McKee)
Date: Tue Dec 14 14:23:39 2004
Subject: [Petal] Re: Petal question
In-Reply-To: <20041213224920.GA29531@narins.net>
References: <20041210210817.GA26030@narins.net>
<20041210214423.GA14733@knowmad.com>
<20041210231241.GA26608@narins.net>
<20041211195551.GG14733@knowmad.com>
<20041213224920.GA29531@narins.net>
Message-ID: <20041214142231.GJ14733@knowmad.com>
On Mon, Dec 13, 2004 at 05:49:20PM -0500, Josh Narins wrote:
> I, too, got a couple Petal messages, then tried sending one and got the
> four hours delayed message.
That's odd. You should try sending a message to the mailing list
administrator and see if they have any ideas.
I've CC'ed the list with this message to see if it gets through.
William
--
Knowmad Services Inc.
http://www.knowmad.com
From bruno at mkdoc.com Tue Dec 14 14:42:03 2004
From: bruno at mkdoc.com (Bruno Postle)
Date: Tue Dec 14 14:42:05 2004
Subject: [Petal] Petal question
In-Reply-To: <20041214142231.GJ14733@knowmad.com>
References: <20041210210817.GA26030@narins.net>
<20041210214423.GA14733@knowmad.com>
<20041210231241.GA26608@narins.net>
<20041211195551.GG14733@knowmad.com>
<20041213224920.GA29531@narins.net>
<20041214142231.GJ14733@knowmad.com>
Message-ID: <20041214144203.GJ21768@webarchitects.co.uk>
On Tue 14-Dec-2004 at 09:22 -0500, William McKee wrote:
>
> I've CC'ed the list with this message to see if it gets through.
Fixed, Josh's mail was being refused because it was relayed from a
server with an invalid hostname.
Josh you need to give your computer a hostname other than "node1",
"node1.narins.net" will do fine.
--
Bruno
From josh at narins.net Sun Dec 12 19:07:10 2004
From: josh at narins.net (Josh Narins)
Date: Tue Dec 14 16:53:52 2004
Subject: [Petal] Dynamic includes...
Message-ID: <20041212190710.GB21435@narins.net>
Hello Petal People,
I would like to do dynamic includes like this...
$template->process({ extra_content => '/other.xml'})
And have the file referred to by "extra_content" in the href
attribute of this this template:
or this file attribute of this one...
But I can't seem to get either to work.
Thanks in advance,
Josh Narins
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.webarch.co.uk/pipermail/petal/attachments/20041212/08c93736/attachment.bin
From chris at webarchitects.co.uk Wed Dec 15 14:16:27 2004
From: chris at webarchitects.co.uk (Chris Croome)
Date: Wed Dec 15 14:16:09 2004
Subject: [Petal] Dynamic includes...
In-Reply-To: <20041212190710.GB21435@narins.net>
References: <20041212190710.GB21435@narins.net>
Message-ID: <20041215141627.GC21173@webarchitects.co.uk>
Hi
On Sun 12-Dec-2004 at 02:07:10PM -0500, Josh Narins wrote:
>
> I would like to do dynamic includes like this...
>
> $template->process({ extra_content => '/other.xml'})
>
> And have the file referred to by "extra_content" in the href
> attribute of this this template:
>
>
>
> or this file attribute of this one...
>
>
> But I can't seem to get either to work.
I can't help with the Perl code you need, but FWIW both the include
syntaxes you have been trying are old hacks and the best way to do this
is using macros, these take a bit of getting used to but they are a lot
more powerful, they are documented here:
http://search.cpan.org/~jhiver/Petal-2.14/lib/Petal.pm#METAL_MACROS
Chris
--
Chris Croome
web design http://www.webarchitects.co.uk/
web content management http://mkdoc.com/
From bruno at mkdoc.com Wed Dec 15 14:33:50 2004
From: bruno at mkdoc.com (Bruno Postle)
Date: Wed Dec 15 14:33:32 2004
Subject: [Petal] table rows using alternating style info?
In-Reply-To: <20041211174558.GA5368@webarchitects.co.uk>
References: <6mzn0lisi1.fsf@Abulafia.hcoop.net>
<20041211174558.GA5368@webarchitects.co.uk>
Message-ID: <20041215143350.GB24204@webarchitects.co.uk>
In addition to getting the odd or even status of the loop item..
petal:condition="true: repeat/even"
..you can do this sort of thing:
petal:condition="true: repeat/start"
petal:condition="true: repeat/inner"
petal:condition="true: repeat/end"
> This example should be added to Petal POD -- there isn't an example
> like this documented anywhere.
These methods are documented, but only when used with the old
deprecated syntax:
http://search.cpan.org/dist/Petal/lib/Petal/Deprecated.pm#loops
Until the documentation for normal Petal syntax is fixed, you need
to refer to that.
--
Bruno
From william at knowmad.com Thu Dec 16 18:40:35 2004
From: william at knowmad.com (William McKee)
Date: Thu Dec 16 18:41:46 2004
Subject: [Petal] Dynamic includes...
In-Reply-To: <20041215141627.GC21173@webarchitects.co.uk>
References: <20041212190710.GB21435@narins.net>
<20041215141627.GC21173@webarchitects.co.uk>
Message-ID: <20041216184035.GJ14733@knowmad.com>
On Wed, Dec 15, 2004 at 02:16:27PM +0000, Chris Croome wrote:
> I can't help with the Perl code you need, but FWIW both the include
> syntaxes you have been trying are old hacks and the best way to do this
> is using macros, these take a bit of getting used to but they are a lot
> more powerful, they are documented here:
Hey Chris,
So that's what METAL is about! Thanks for the info. I've been using the
old XInclude format since it was introduced as a replacement for the
original technique. Using METAL, it looks like I can keep all my
includes in a single file and reference the various sections as needed.
That's pretty useful.
Cheers,
William
--
Knowmad Services Inc.
http://www.knowmad.com
From chris at webarchitects.co.uk Fri Dec 17 00:20:23 2004
From: chris at webarchitects.co.uk (Chris Croome)
Date: Fri Dec 17 00:20:25 2004
Subject: [Petal] Dynamic includes...
In-Reply-To: <20041216184035.GJ14733@knowmad.com>
References: <20041212190710.GB21435@narins.net>
<20041215141627.GC21173@webarchitects.co.uk>
<20041216184035.GJ14733@knowmad.com>
Message-ID: <20041217002023.GA15731@webarchitects.co.uk>
Hi
On Thu 16-Dec-2004 at 01:40:35PM -0500, William McKee wrote:
>
> So that's what METAL is about! Thanks for the info. I've been
> using the old XInclude format since it was introduced as a
> replacement for the original technique. Using METAL, it looks like
> I can keep all my includes in a single file and reference the
> various sections as needed. That's pretty useful.
Yeah, I could post some examples of stuff I have done with it in
MKDoc I guess if that would be interesting, I haven't done anything
amazing but I personally find that examples are the best way to
understand stuff... :-)
Chris
--
Chris Croome
web design http://www.webarchitects.co.uk/
web content management http://mkdoc.com/
From william at knowmad.com Fri Dec 17 02:23:18 2004
From: william at knowmad.com (William McKee)
Date: Fri Dec 17 02:24:29 2004
Subject: [Petal] Dynamic includes...
In-Reply-To: <20041217002023.GA15731@webarchitects.co.uk>
References: <20041212190710.GB21435@narins.net>
<20041215141627.GC21173@webarchitects.co.uk>
<20041216184035.GJ14733@knowmad.com>
<20041217002023.GA15731@webarchitects.co.uk>
Message-ID: <20041217022318.GT14733@knowmad.com>
On Fri, Dec 17, 2004 at 12:20:23AM +0000, Chris Croome wrote:
> Yeah, I could post some examples of stuff I have done with it in
> MKDoc I guess if that would be interesting, I haven't done anything
> amazing but I personally find that examples are the best way to
> understand stuff... :-)
It'd sure be helpful for me. It'd be nice to have a wiki where we could
start collecting these examples.
William
--
Knowmad Services Inc.
http://www.knowmad.com
From simonmcc at nortelnetworks.com Sat Dec 18 21:07:54 2004
From: simonmcc at nortelnetworks.com (Simon McCaughey)
Date: Sat Dec 18 21:09:09 2004
Subject: [Petal] option selected
Message-ID: <013401c4e545$a4c19270$70a1a02f@AtticPC>
I can't seem to get a reasonable solution to the option selected problem, basically I'm going through a list, adding options for each item, and if the one is selected then add a selected attribute
this is what I'm doing:
and what I think I need is :
This is my first attempt at this, please don't laugh, I just started today :)
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webarch.co.uk/pipermail/petal/attachments/20041218/22eec7b0/attachment.htm
From chris at webarchitects.co.uk Sun Dec 19 00:51:00 2004
From: chris at webarchitects.co.uk (Chris Croome)
Date: Sun Dec 19 00:51:03 2004
Subject: [Petal] option selected
In-Reply-To: <013401c4e545$a4c19270$70a1a02f@AtticPC>
References: <013401c4e545$a4c19270$70a1a02f@AtticPC>
Message-ID: <20041219005100.GA6926@webarchitects.co.uk>
Hi
On Sat 18-Dec-2004 at 09:07:54PM -0000, Simon McCaughey wrote:
> I can't seem to get a reasonable solution to the option selected
> problem
Yeah, this is confusing at first, basically you need to have two
option elements, something like this:
Here the first