|
|
Post a Project »
Find a Professional HTML Freelancer!
Find a Freelancer to help you with your HTML projects
| |
|
Problem creating a new page from an Template
03-17-2006, 10:16 AM
|
Problem creating a new page from an Template
|
Posts: 24
|
I've created a new template, with a css file attach to it, and there are relative links inside the template.
When creating a new page from the template I get 2 problems:
1.The new page doesn't load the css file properly, inorder for me to fix that I need to open the template file and do update files, only after dooing that the css loads in the new page. what's up with that?
2.The relative links on the page are all messed up and none works, I've tried playing with that a bit but seems like nothing help.
-The template is inside the "template" directory.
-The css is inside the "css" directory.
-The index file is in the root directory.
|
|
|
|
03-17-2006, 10:28 AM
|
Re: Problem creating a new page from an Template
|
Posts: 488
Name: Chip Johns
Location: Savannah Georgia
|
Hi AirParker, Welcom toWebmasterTalk, (As a new POSTER anyway!)
Not enough information. Is it background images that are not working, or what?
If you can let us know what is crashing, and spply us with a copy of the code.
Give us a snippet of the code that isn't working in your css file and also show us
the line of code you are using to link to the css from your html file..
|
|
|
|
03-17-2006, 10:30 AM
|
Re: Problem creating a new page from an Template
|
Posts: 278
Location: Orlando, FL
|
it might help if you placed all your files in the "root" directory. -- It's easier that way.
|
|
|
|
03-17-2006, 10:36 AM
|
Re: Problem creating a new page from an Template
|
Posts: 24
|
Quote:
|
Originally Posted by jyoz22
it might help if you placed all your files in the "root" directory. -- It's easier that way.
|
Well ya it might help, but I want everything in place, its a site that needs to be update alot, I dont want a mess in my root dir.
Thx for the tip anyway 
|
|
|
|
03-17-2006, 10:46 AM
|
Re: Problem creating a new page from an Template
|
Posts: 24
|
Quote:
|
Originally Posted by ChipJohns
Hi AirParker, Welcom toWebmasterTalk, (As a new POSTER anyway!)
Not enough information. Is it background images that are not working, or what?
If you can let us know what is crashing, and spply us with a copy of the code.
Give us a snippet of the code that isn't working in your css file and also show us
the line of code you are using to link to the css from your html file..
|
Thx for the warm welcome^^
Here is some info:
Template css attach code:
Code:
<link href="../css/template.css" rel="stylesheet" type="text/css" />
It exits the currect directory and enters the css folder which is all fine.
New page css attach code:
Code:
<link href="/css/template.css" rel="stylesheet" type="text/css" />
It prebebly should remove the "/" at the begining so it will be "css/template.css" but it doesn't.
As I said earlier inorder for me to fix it, I enter the template in dreamweaver and do update files, only then the problem is fixed.
How to resolve that problem so I won't have to do this everytime I create a new page?
Oh and btw the css includes the entire positioning of the tables , backgrounds, fonts and sizes, basiclly everything...
Last edited by AirParker; 03-17-2006 at 10:47 AM..
|
|
|
|
03-17-2006, 11:09 AM
|
Re: Problem creating a new page from an Template
|
Posts: 488
Name: Chip Johns
Location: Savannah Georgia
|
Yes, that first "/" should be removed.
Quote:
It prebebly should remove the "/" at the begining so it will be
"css/template.css" but it doesn't.
|
I'm not sure what is happening? What should remove the "/" you or
dreamweaver? You say "but it doesn't" What isn't removing it? If you
don't want to do this in dreamweaver, what are you making the
changes with?
--
one thing that you can do is make the links absolute. I do this when I am
working on bigger sites, or sites that are going to be changing a lot.
change
<link href="/css/template.css" rel="stylesheet" type="text/css" />
to
<link href=" http://www.mysite.com/css/template.css" rel="stylesheet" type="text/css" />
use this in every page and you should be okay. One thing that you lose is the
ability to preview without sending the page to the web. But, once you get the
template made the way you want it, it really doesn't matter. you should only be
adding content to the "content area."
Is this an option, or do you need to figure something else out?
|
|
|
|
03-17-2006, 11:17 AM
|
Re: Problem creating a new page from an Template
|
Posts: 24
|
Quote:
|
Originally Posted by ChipJohns
Yes, that first "/" should be removed.
I'm not sure what is happening? What should remove the "/" you or
dreamweaver? You say "but it doesn't" What isn't removing it? If you
don't want to do this in dreamweaver, what are you making the
changes with?
--
one thing that you can do is make the links absolute. I do this when I am
working on bigger sites, or sites that are going to be changing a lot.
change
<link href="/css/template.css" rel="stylesheet" type="text/css" />
to
<link href="http://www.mysite.com/css/template.css" rel="stylesheet" type="text/css" />
use this in every page and you should be okay. One thing that you lose is the
ability to preview without sending the page to the web. But, once you get the
template made the way you want it, it really doesn't matter. you should only be
adding content to the "content area."
Is this an option, or do you need to figure something else out?
|
Sry for my english.
I'm was saying Dreamweaver should remove the "/" so the link will work, but dreamweaver doesn't remove that and therefore its not working.
Maybe i'll explain that part again- the first code i gave is what the template file has, and when i view it its all ok and the css file is attach correctly.
In the 2nd code I gave here its what generated in the new page code, this is a link that dreamweaver generates for the root directory, but it is wrong.
Why doesn't it generate a working like? anything i did wrong?
Last edited by AirParker; 03-17-2006 at 11:20 AM..
|
|
|
|
03-17-2006, 12:01 PM
|
Re: Problem creating a new page from an Template
|
Posts: 488
Name: Chip Johns
Location: Savannah Georgia
|
If dreamweaver is set up NOT to change code, it may not fix it. You can hand
code with dw and it will not change your code unless you ask it too,
-------
Don't wory about your english! I'm sure I can't speak your language at all!
Some things I would probably try:
*1) Remove the link for the css and add it again through Dreamweaver by
attaching Style Sheet button.
2) save a basic template in your root folder. When you want to create a new
file. Don't drag a copy of it to the folder you want it in. This will work but try
opening the template and then immediately SaveAs and save it in the folder
that it will be in, and give it the name that you want. Dreamweaver SHOULD
change the link in the file automatically. Whenever DW asks you to update,
click YES
3) DO NOT! move files around OUTSIDE of DreamWeaver. Do not open explorer
and go to the folder and move things around. Only do this inside of dreamweaver..
4) make sure that you have your site setup properly. Is your testing server set
up properly.
Other than some of these things, I can't think of anything else that it could
be..!! If you can't get it come back, though, hopeully we will figure it out. 
Last edited by ChipJohns; 03-17-2006 at 12:03 PM..
|
|
|
|
03-17-2006, 02:10 PM
|
Re: Problem creating a new page from an Template
|
Posts: 24
|
Well:
1.tried and not working still same problem.
2.prbebely help, but as I said earlier, my goal is to have evertything in place,tho if the template file location will be the only problem, i'll move it to the root dir.
3.already know that and using only dreamweaver filemanager.
4.tested and working fine.
Anyway here is my temp web(still working on it):
http://members.lycos.co.uk/haimrev/Untitled-5.html
Its build from 2 menus, the upper menu which is just a regualr links in a table, and the 2nd menu (under the first one) which is a javascript dropdown menu.
Notice that the links in the upper menu all work, but when u access more then 2 links, it shows as dead.
Enter the site, click on the "general" link after that click on the "Primer" link, see that its working fine.
Now try to click on the "national" link, i'm getting a dead link here.
I realod the page and enter the "national leage" and to my suprise now its working same for the "cup" link.
What do u think is wrong here?
|
|
|
|
03-17-2006, 04:43 PM
|
Re: Problem creating a new page from an Template
|
Posts: 488
Name: Chip Johns
Location: Savannah Georgia
|
AirPark,
Man where did you get all that javaScript from?
You can pick up a lot of free stuff, but you need to know how to manipulate it.
There is a lot going on in these pages! I suggest that you commit to a more
simplified page structure. You are never going to get these menus to work
properly. Drop down menus are very dificult to get to working right.
I know it would be cool to get them working, but that's why the guys who build
those things make a lot of money! I only put drop downs on a page if someone
really wants them, and they wil pay dearly.
The bigest problem is compatibility. Getting them to work the same across
browsers. And, you are having trouble getting them to work on your first
browser.
And, I must say that the dropdown you are working with must be one of the
most difficult to work with.
If this is a do-it-yourself job, I would forget the menu or think about hiring
someone to do it AirPark..
|
|
|
|
03-17-2006, 05:01 PM
|
Re: Problem creating a new page from an Template
|
Posts: 24
|
All that javascript is from a site that I've found which gives a usefull script.
I've edit it and set it as i wished, it took me ALOT of time but i finally got it working, tho the dropdown menus doesn't work with IE...
Anyway the problem is not with the javascript, the upper menu above the dropdown menus is a regualer links in a table.
|
|
|
|
03-17-2006, 06:09 PM
|
Re: Problem creating a new page from an Template
|
Posts: 24
|
Thx alot for all your help Chipjohns!
I've found what was the problem...
Pretty dumb actually, but thats ok since I'm a n00b at this  , best thing is to keep learning from my mistakes.
|
|
|
|
|
« Reply to Problem creating a new page from an Template
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|