[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 358
  • Last Modified:

css on a template

hi
all the pages of a site i`m building are based on a template i have created. now i want to create an external css and to imlement it on the pages. but when i try to create the css file i get a message: if you are working on a page with a template make sure that there is an editable region to the head tag.
now i now how to make en editable region in the body, but how can i make it to the head tag?

best regards

ron
0
derrida
Asked:
derrida
  • 9
  • 6
  • 4
1 Solution
 
Jason C. LevineNo oneCommented:
In the source code of the template, select the Head tag and the Modify | Templates | Make Editable Region
0
 
derridaAuthor Commented:
hi
through the "modify" menu there is no "make editable region" so i tried it through the "insert" menu. but then it is seen on the page itself.


ron
0
 
Jason C. LevineNo oneCommented:
I think it is called Make Attribute Editable and the whole tag from <head> to </head> has be selected.

It's there...
0
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 
derridaAuthor Commented:
hi
i chose the whole head tag, then modify-templates-make attribute editable.
then a dialogue box come up and in the drop down menu there is nothing.
i pressed "add" and i am not sure what to write there: "css"?
then i could add an external css to all the pages that are based on the template?


best regards

ron
0
 
Jason C. LevineNo oneCommented:
Ron,

My bad. I was working from memory and my memory was faulty.

In the template source code, look for the following lines in between the Head tags:

<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->

If those are there, you can insert the <link rel="stylesheet" type="text/css" href="your.css"> after the begineditable comment.

If those are not there, do Insert | Template Objects | Editable Region inside the Head tag.  It will insert something like the above.  Then add the CSS style to the template and reapply the template to all pages in the site.
0
 
derridaAuthor Commented:
hi
bizzare thing has happened. the lines were not there so i tried to insert them. as i inserted them it completly deleted the body tag. i mean all the table with everithing in it.
maybe i will write in the new template i`ll do these two lines by hand?
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
but where exactly?
<head>
<!-- TemplateBeginEditable name="head" -->
then every thing that is in the head tag. and then
<!-- TemplateEndEditable -->
</head>
is that the right way?
can i attach an external css to the page before making it into a template? so then every page that will be built on the template will also have the css?


best regards

ron
0
 
radnorCommented:
WHAT?!?

Start DW
click File -> New ->General tab -> CSS ---> Create
edit this file as you see fit.
I will then save it with my HTML pages (same directory)  and give it a name of styles.css

Then I open my TEMPLATE.   (The ENTIRE template IS editable!)
Click Text -> CSS Styles -> Attach Style Sheet

A new window will open (Link External Style Sheet)
Click browse go to the directory where your HTML and CSS files reside and select the CSS file
Click OK then OK again and your DONE!!!

This line was inserted ABOVE the closing HEAD tag
<link href="../styles.css" rel="stylesheet" type="text/css" />
</head>

then SAVE your TEMPLATE.  All pages created with THIS template WILL BE UPDATED and use the style sheet.

Your done!!!


0
 
Jason C. LevineNo oneCommented:
Ron,

Radnor is right, this should be easily done by editing the .dwt file.  Have you been editing that file or a page based on a template.
0
 
radnorCommented:
From the sound of it, I think he is trying to edit a page CREATED from a template.

0
 
Jason C. LevineNo oneCommented:
I'm starting to think that way too.  Sorry about the wrong path, guys.  We have a new baby in the house and my mind has been wandering.
0
 
derridaAuthor Commented:
hi
no i was working on the template itself. as far as i know i can add editable regions just to templates.
and then when i inserted the lines the whole boddy part disappeared, and so other pages that was built on this template, so now i have to rebuild everythig again. i have no idea what has happened.
but i need to know for the future: if i build a page and before making it a template i attach to it an external css will all the pages built on this template will be using the external css?
if not how exactly (and please give me a detailed answer) do i make the head an editable region whithin a template?


best regards

ron
0
 
Jason C. LevineNo oneCommented:
>> but i need to know for the future: if i build a page and before making it a template i attach to it an external css will all the pages built on this template will be using the external css?

Yes.
0
 
radnorCommented:
jason1178,

Dont mean to hijack the thread but, CONGRATS dude!  1st one?  I have 2, young adults now.  
0
 
Jason C. LevineNo oneCommented:
first one.  I've been at the hospital since Thursday on a borrowed laptop.  

http://www.babysites.com/sites/babylevine/
0
 
derridaAuthor Commented:
hi
well its not about the subject but congratulation for the new baby:)

ron
0
 
Jason C. LevineNo oneCommented:
Thanks Ron.

Back to you now.  Where are we at with your problem.  Have you recovered the template yet?
0
 
derridaAuthor Commented:
hi

i almost finished to rebuilt the page then i`ll attach en external css to it. then i`ll define it as a template.
if i understood correctly then every page base on that template will be attached also to the css.
am i right?


best regards

ron
0
 
radnorCommented:
Here  about 4 replies from the bottom I described templates.....

http://www.experts-exchange.com/Web/WebDevSoftware/DreamWeaver/Q_21744013.html

I think it will clear the idea of templates up.
0
 
Jason C. LevineNo oneCommented:
Hi mrichmon,

rador's answer is the best one.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 9
  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now