Hello All,
I've been programming with PHP for quite a long time now and used to
separate PHP code and HTML. I just put HTML into defferent .ihtml
files and load them as needed using the PHPLib's Template class. Now,
as I'm trying to develope with Midgard, the next problem arises:
Suppose, I want to include a page switcher into the News page
(something like "Page: [1] [2] [3] [4] [5]"). Without Midgard, I then define
the following three .ihtml templates:
pager.ihtml:
<p class="pager">
Page:
{PAGES}
</p>
pager.item.cur.ihtml:
<span class="pagercuritem">{PAGE}</span>
pager.item.ihtml:
<span class="pageritem"><a href="{URL}page={PAGE}">{PAGE}</a></span>
Then I construct some Pager class that I feed the URL and the number
of pages to. The following line then goes into my PHP code:
$pager = new Pager("http://blah-blah-blah?action=news&", 5);
$pager->output();
So, the question is: how do I implement the same functionality with
Midgard?
I suppose I could put my code into a snippet and then call it later on
the page. But how do I define and access the templates withing the
snippet code then?
I hope someone on this list will provide me with a simple example to
start with...
--
See you,
Andrey.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]