datadoit
|
Posted: 08/12/2010, 7:43 AM |
|
If you ever look at the HTML of your CCS page, you'll sometimes see this
attribute:
{page:pathToRoot}
However, it won't always be created for you. To make certain that your
site is always portable across various servers, paths, or subpaths, it's
a good practice to place this variable extensively in every reference to
links, images, styles, etc.
Examples:
<link rel="stylesheet" type="text/css"
href="{page:pathToRoot}Styles/style.css" />
<script type="text/javascript"
src="{page:pathToRoot}Scripts/scripts.js"></script>
<a href="{page:pathToRoot}index.php">Home</a>
<img src="{page:pathToRoot}images/myimage.gif">
Placement of this attribute is particularly important when using
includable pages. Using it anywhere and everywhere appropriate, and
you'll never have to worry about the portability of your CCS application.
|
|
|
CodeChargeMVP
Posts: 473
|
Posted: 04/11/2011, 2:57 AM |
|
Hi Datadoit,
I�m in the middle of this issue:
http://forums.yessoftware.com/posts.php?post_id=114953
The header and the footer of our application software were created before than I joined to
this company, this two php files "header.php" and "footer.php" include some lines this way:
<link href="{page:pathToRoot}Styles/adx.css" type="text/css" rel="stylesheet">
<link href="{page:pathToRoot}Styles/Informantes/Menu.css" type="text/css" rel="stylesheet">
<link href="{page:pathToRoot}Styles/Informantes/cabecera.css" type="text/css" rel="stylesheet">
I�m moving the software application to a linux server,so I should lowercase the style folder
and their files inside,everything worked great on the rest of files, but on the header and the
footer If I change to:
<link href="{page:pathToRoot}styles/adx.css" type="text/css" rel="stylesheet">
<link href="{page:pathToRoot}styles/Informantes/menu.css" type="text/css" rel="stylesheet">
<link href="{page:pathToRoot}styles/Informantes/cabecera.css" type="text/css" rel="stylesheet">
it�s stop working, �Shall I create a new header and footer page? �Does this lines where created when creating the page?
Thank you very much in advance.
Quote datadoit:
If you ever look at the HTML of your CCS page, you'll sometimes see this
attribute:
{page:pathToRoot}
However, it won't always be created for you. To make certain that your
site is always portable across various servers, paths, or subpaths, it's
a good practice to place this variable extensively in every reference to
links, images, styles, etc.
Examples:
<link rel="stylesheet" type="text/css"
href="{page:pathToRoot}Styles/style.css" />
<script type="text/javascript"
src="{page:pathToRoot}Scripts/scripts.js"></script>
<a href="{page:pathToRoot}index.php">Home</a>
<img src="{page:pathToRoot}images/myimage.gif">
Placement of this attribute is particularly important when using
includable pages. Using it anywhere and everywhere appropriate, and
you'll never have to worry about the portability of your CCS application.
_________________
Best Regards
Entrepeneur | NT Consultant
|
|
|
|