cant get it right
| From: | Anders Gjermshus | Date: | Sun, 28 Nov 2004 19:55:36 +0000 |
| Subject: | cant get it right | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-12003@lists.php.net to get a copy of this message | ||
Hi.
I tried this for a time but I can't get it right. I hope someone here can
help me.
I'm trying to make a user menu. I assign to arrays to smarty. One with
headers and one with all the links that belongs to the headers.
Array
(
[0] => Rights
[1] => Controlpanel
[2] => Users
)
Array
(
[0] => Array
(
[0] => Array
(
[title] => User rights
[url] =>
./modules/bruker_adm/mod_permissions.php?sid=652c90168d3fdc48e5534c03883ac84
8&mode=find_user
)
)
[1] => Array
(
[1] => Array
(
[title] => LogOut
[url] =>
./ucp.php?sid=652c90168d3fdc48e5534c03883ac848&mode=logout
)
)
[2] => Array
(
[2] => Array
(
[title] => Add user
[url] =>
./modules/bruker_adm/mod_user_adm.php?sid=652c90168d3fdc48e5534c03883ac848&m
ode=add_user
)
[3] => Array
(
[title] => Alter user
[url] =>
./modules/bruker_adm/mod_user_adm.php?sid=652c90168d3fdc48e5534c03883ac848
)
[4] => Array
(
[title] => Delete user
[url] =>
./modules/bruker_adm/mod_user_adm.php?sid=652c90168d3fdc48e5534c03883ac848
)
)
)
Here is my template:
<table width="139" border="0" cellspacing="0"
cellpadding="0"
id="login_table">
{section name=Cat loop=$Cats}
<tr>
<td align="left" valign="middle"
height="16">
{$Cats[Cat]}
</td>
</tr>
{section name=sub_menu loop=$Menu[Cat]}
<tr>
<td align="left" valign="middle"
height="16">
<a href="{$Menu[Cat][sub_menu].url}"
target="_self"> - {$Menu[Cat][sub_menu].title}</a>
</td>
</tr>
{/section}
{/section}
</table>
And here is my result:
Rights
- User rights
<http://localhost/solheimkoret/admin/modules/bruker_adm/mod_permissions.php?
sid=652c90168d3fdc48e5534c03883ac848&mode=find_user>
Controlpanel
-
Users
-
-
- Add user
<http://localhost/solheimkoret/admin/modules/bruker_adm/mod_user_adm.php?sid
=652c90168d3fdc48e5534c03883ac848&mode=add_user>
Can someone explain to me why it returns that result to me?
Thanks
Anders