Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Meta tags in templates

Status
Not open for further replies.

ssidetv

Technical User
Aug 30, 2001
57
GB
Problem: I use two templates on which virtually all my pages are based. The key common area they carry is a jump menu which can change quite frequently, so it makes sense to have it update automatically across the board.
Now, a subcontractor doing web-placement work for us has taken all the pages and added a load of meta tags which are largely specific to each page. When I retrieved these new files back into DW, the new meta tags embedded themselves into the non-editable regions of each page.
Thus, next time I update the jump menu in the templates, all these meta tags will disappear the moment I save the template and click 'yes' to update all files.
Unlike Document Title, which has inbuilt editing space in templates, there does not seem to be a similar allowance for making meta tags editable.

Question 1: Is anyone aware of how to make a new editable region inside the source code section of the page?

Question 2: Is there any way to substitute the jump menu in the template with a piece of code or a script that will invoke the jump menu from a separate location, making the menu endlessly editable without touching the templates?

Thanks in advance.

Nick
 
Hi ssidetv,

I do have a piece of advice for you.
I spent almost 2 weeks of my life trying to figure out dreamweaver templates when I first got it. And drove myself crazy pulling my hair out.
Templates are a pain in the arse!

I use an include function which is much more functional.
Have a look at one of my sites Go to three sections
1st. (Front page)
2nd. 3rd.
All 3 have slightly different meta tags, but I use the same 2 includes(templates) throughout the whole site (300+ pages)

There may be some dead links as I'm now updating and giving it a slight makeover.

Hope I made some sense. I've been up all night, so a little tired.
If i can help at all, feel free to shoot me an email

colin@chefmedia.ca

 
Hi

I use templates a lot more now that I know how to use them properly, and on my terms, not Dreamweaver's, and I have a lot of success with them. They are not the be all and end all of web design, and include files can be very useful, but if you can utilise them, do.

I always create two or three extra editable regions, one for meta tags (if I know they are going to be different on every page), one for css styles and another for javascripts. If you don't do the javascript one, then you cannot add any dreamweaver behaviours to the created pages, as it will not allow you to write in that area.

These templates are designed for high volume brain dead page creation by people who are not really web designers, so they assumed that extra functionality would not be required. We can adjust them to be a sound basis for an initial page.

To add a new editable region which isn't selectable form the main page view:

Open the page in the html code window. Find the bit you wish to make editable (include the script, and style open and closing tags) and place these codes around them:

Code:
<!-- #BeginEditable &quot;yourregionname&quot; -->

whichever bit you require
- <script> etc...

<!-- #EndEditable -->
Dreamweaver will now see this as a legitimate editable region. If you make sure that your template file has one css style, one javascript and one meta tag you can make those regions editable. Once your javascript for the jump menu is in the editable region you can change it when and wherever you like.

Any additional javascript behaviours, when added by dreamweaver, will be placed in the same place as all of it's other scripts, so if you already have one MM_ javascript function in the editable region then you can add/adjust as many of them as you like, including timelines etc.

I feel like I am rambling, so if you need any more on this just say. Derren
[Mediocre talent - spread really thin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top