Базы данныхИнтернетКомпьютерыОперационные системыПрограммированиеСетиСвязьРазное
Поиск по сайту:
Подпишись на рассылку:

Назад в раздел

Dreamweaver FAQ
 Macromedia Dreamweaver FAQ
 
Вопрос 24
Почему в шаблоне так трудно создавать ссылки?
Ответ привожу без перевода, т.к. мне не совсем понятен смысл оригинала.
 
Ответ:
The problem is occuring when trying to write a link in the template yourself, and not taking into account that the template file will not be located in the root, *but in the Templates directory* which is located in the root.

If you enter chapter1.html as the link in the template, then when the template is saved in the Templates directory (and it *will* be, this is how it's engineered to work) the link will be to a file in the Templates directory, not somewhere else in your site. You'd have to save your entire site into the Templates directory for the link you write to be correct.

If you're going to enter a link instead of browsing for the file as I advised (see end of this message), then the link must begin with ../ to get up & out of the template directory!

Also, site root relative links avoid all this, but are a pain when trying to check your work locally because they are only understood by the server. Your local machine can't use them at all - that's another reason (among others even if you're not using site-root relative links) why DW has to use a TEMP file to preview, the links to subsequent pages won't function - because it would take a "server" to interpret them and deliver the subsequent document (this why frames don't preview using site-root - the "frames" are acutally subsequent pages, the server would have to deliver them.)

This trying to link to non-existant files is one reason why DW has the ability to create new files in the site window - and you can use the site map function on the left to see how you're gonna string it all together. You right-click (mac version use the SITE menu) and select "new file" and name it whatever page you want to link to, but have not yet created, and get some "blank" files down there to get your site structure going. For creating your subdirectory structure, "new folder" is also available.

Once you've gotten the key files & your subdirectory structure in place, you can open all those blank pages, and apply the template to the page: MODIFY>TEMPLATES>Apply template to page.

*whew* I admit, it's tough to understand. But with knowledge comes power. =)

Vernon Viehe
Macromedia Technical Support
 
 
Copyright © 1999-2000 Craig Foster Русский перевод ©1999-2000 А.Терещенко




  • Главная
  • Новости
  • Новинки
  • Скрипты
  • Форум
  • Ссылки
  • О сайте




  • Emanual.ru – это сайт, посвящённый всем значимым событиям в IT-индустрии: новейшие разработки, уникальные методы и горячие новости! Тонны информации, полезной как для обычных пользователей, так и для самых продвинутых программистов! Интересные обсуждения на актуальные темы и огромная аудитория, которая может быть интересна широкому кругу рекламодателей. У нас вы узнаете всё о компьютерах, базах данных, операционных системах, сетях, инфраструктурах, связях и программированию на популярных языках!
     Copyright © 2001-2024
    Реклама на сайте