RE: Special Tags
by TimeShadow other posts by this author
Feb 1 2003 3:48PM messages near this date
view in the new Beta List Site
Re: Special Tags
|
RE: Determing if a file has changed
Thank you for the help. I'll take a look at a few different things and
give it a try.
James
[]
> >>If I wanted to add special tags into an html file
> >>to mark out an editable section, what would I use?
> >
> >>After placing these tags into the html file, what do
> >>I need to add to the cgi script to seek out those tags
> >>and place the text that resides between the tags into a
> >>form field for a user to edit?
> >
> > - HTML RFC Re: Comment Tags (<!-- -->)
> > - www.perldoc.com or search.cpan.org Search for HTML::Parser and CGI
> > - in the man pages read perlre Re: m///
> >
[snip]
Burak Gürsoy wrote:
> I think that you should look at some smilar scripts, espacially forum
> programs...
>
>
Hey, all:
I've been using template toolkit http://template-toolkit.org/. It can be
used to generate static or cgi-based pages... with varable substitution,
passed arrays, arrays of hashes, etc., etc.
I think it's a good way to go. The tags like [% variable %] are embedded
in the html and parsed. You can include other html snippets with
variables, pre-define variables, etc.
Consider [% FOREACH link = webpages %] where 'webpages' is an array of
hashes like
[ webpages = [ {link=> 'http://foo.com', name=> 'www.foo.com'},
{link=> 'http://bar.com', text=> 'www.foo.com'} ]
]
[% FOREACH link = webpages %]
<p> <SPAN class="[% link.sc_title %]">[% link.title %]</SPAN></A></p>
[% END %]
where you can delcare the array in the same or another (main) document.
Pretty powerful stuff, I'd say. Very flexible.
Good luck!
-- mike higgins
^ ^
<-|->
(.)__ the world is a big box of paints.
__ __ and others, the canvas we're dealt.
| | - XTC
_/ \_
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Charbeneau, Chuck
=?iso-8859-9?Q?Burak_G=FCrsoy?=
michael higgins
TimeShadow
|