sosamv
Posts: 50
|
| Posted: 01/19/2009, 8:21 AM |
|
Hi guys, I need to manage different access level to my web app, for that reason i created a header for my normal users "headerUsers" and other for admins "headerAdmins", after that, I want to store the headerUsers" on a folder called "user" and the "headerAdmins" on a folder called admins, so the problem is that i'm including the "headerUsers" on a page on the root path and later on other under the "user" folder, but is crashing obviously for the wrong path. is there a way to include "{RelativaPath}" on the html?
e.i.
<link href="{RelativePath}layout/menuVecino.css" rel="stylesheet" type="text/css" />
(This doesnt work)
Thanx!
|
 |
 |
jjrjr1
Posts: 942
|
| Posted: 01/19/2009, 8:44 AM |
|
Hi.
Yes..
Keep the html you have above and...
In your before show event at the page level add this custom code:
global $Tpl;
$Tpl->setvar("RelativePath",$YourPathNameString);
Don't forget the "/" either in yor HTML or in your path string.
Have fun
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
sosamv
Posts: 50
|
| Posted: 01/19/2009, 10:03 AM |
|
Thanx! that does the job!
|
 |
 |
syah
Posts: 29
|
| Posted: 02/10/2009, 6:28 PM |
|
can u give me explanation more clearly? where to put
<link href="{RelativePath}layout/menuVecino.css" rel="stylesheet" type="text/css" />
and
global $Tpl;
$Tpl->setvar("RelativePath",$YourPathNameString);
that u explain before...please help...
|
 |
 |
jjrjr1
Posts: 942
|
| Posted: 02/13/2009, 8:11 AM |
|
Syah
The <link... is a HTML tag and would get placed in your pages HTML
The PHP code
global .... etc would go in your pages PHP code.
In this case on the pages before show event.
Try re-reading the posts above and let me know what part you need more explaination of.
Have fun.
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
|