|
Posted by Robert Cummings on 11/22/05 01:41
On Mon, 2005-11-21 at 18:17, Dan Baker wrote:
> "Robert Cummings" <robert@interjinn.com> wrote in message
> news:1132600810.27185.32.camel@blobule.suds...
> > On Mon, 2005-11-21 at 13:41, Dan Baker wrote:
> > There are two ways for retrieving data. The first you have seen is the
> > tag form, but obviously that's a problem when the data goes into a tag
> > :) For this there is the embed form (a simple example follows but data
> > can be retrieved from modules/components in the same way):
> >
> > <a href="page.php?op=View&id={jinn:echo value={jinn:getValue name=_GET,
> > path=id}}">
>
> So, how do you go about having optional links? Like, admin people get a
> button that other don't?
I guess you missed the custom tag post I made before:
<project:access level="admin">
<a href="page.php?op=View&id={jinn:echo value={jinn:getValue name=_GET,
path=id}}">
</project:access>
"project" is an arbitrary name generally chosen to reflect a project.
For different projects I usually assign unique tag spaces for any given
project. Often used tags that I share between projects I usually assign
a tag space name of "common". And tags that come packaged with interjinn
are assigned the "jinn" tag space name.
There's other ways too. InterJinn supports if/elseif/else tags for
display logic (such as optional content based on some status). The
custom tag just happens to be very concise and clear which is generally
how I tend to make my templates :)
The templating engine isn't just limited to these types of tags, custom
compilers can choose to extend the base tag or embed classes, or they
can do whatever they want to the content. The tag system just happens to
be what I tied in most closely with the application engine.
Cheers,
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
[Back to original message]
|