logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-19-2014, 11:39 PM   #1
hennesse
 
Join Date: Jul 2014
Posts: 2
Default Template Impossibility ?

My site is hierarchical with many levels, and I want to include an up-arrow that will allow the use to navigate to the next-higher directory.

HTML Code:
<a href=”../index.html”><img src=”up-arrow.gif”></a>
All my pages (except home page) use the same template, so it would be nice if I could just include this in the template.

However, DW thinks I want to reference that particular instance of index.html, so it updates it to "../../../../index.html" Wrong!

Is there any hack I can use to make DW leave the reference alone?

Dave
hennesse is offline   Reply With Quote
Old 07-21-2014, 01:24 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

try edit in a text editor lik notepad. i realy thik this is a flaw in dw template system but i never use it so i maybe shouldnt say that
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-21-2014, 01:44 AM   #3
hennesse
 
Join Date: Jul 2014
Posts: 2
Default

Quote:
Originally Posted by edbr View Post
try edit in a text editor lik notepad. i realy thik this is a flaw in dw template system but i never use it so i maybe shouldnt say that
Thanks. I thought of another way:
HTML Code:
<img src="up-arrow.gif" onClick='document.location="../index.html"' />
DW updates the path to up-arrow.gif, but does NOT mess with the inline Javascript

A little clumsier, but it seems to work.
Dave
hennesse is offline   Reply With Quote
Old 07-21-2014, 01:48 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

good. cant resist saying you should maybe look at using includes rather than dw templates, just so much easier to update or change without site wide changing. I really just dont like them
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-21-2014, 03:46 PM   #5
Ricky55
Ricky55's Avatar
 
Join Date: Oct 2005
Location: West Yorkshire, UK
Posts: 1,855
Default

Its more a limitation of templates than a bug.

Dreamweaver basically just corrects paths to make them relative from the template.

I wouldn't use this method if you can help it. Relying on javascript to just get a link working isn't the best idea.

If you can I would really try to use includes as Ed suggests.

If you don't want to use PHP for a static site thats understandable. In this case you could look at using an app like Codekit of Hammer. These provide include like functionality without PHP.

Personally I always use PHP as it always comes in handy for other things even on a static site.

HTH
__________________
Qwerty Design

Check out my blog for web design insights.
http://www.qwerty-design.co.uk/
Follow me on Twitter: @QwertyDesignUK
Ricky55 is offline   Reply With Quote
Old 07-22-2014, 01:11 AM   #6
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

dont forget the include using object as a option also
<object name="foo" type="text/html" data="foo.txt"/>

or simple javascript
<script type="text/javascript" src="include_html.js"></script>
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas

Last edited by edbr; 07-22-2014 at 01:51 AM..
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:44 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com