CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Relative Paths [RESOLVED]

Print topic Send  topic

Author Message
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!
View profile  Send private message
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
View profile  Send private message
sosamv

Posts: 50
Posted: 01/19/2009, 10:03 AM

Thanx! that does the job!
View profile  Send private message
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...
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.