ROBOWEB : Документация : Dreamweaver FAQ : html, perl, cgi, php, css, 3dmax - 3D Studio русская документация с примерами программ, RTFM и описание протоколов, описание dreamweaver, все для вебдизайнера
Разработка сайтов, web дизайн - Центр Русского Дизайна HOD.RU
FLASH
3D Studio MAX
DreamWeawer FAQ
Изучение HTML
META тэги
CSS
Руководство по стилям
Спецификация WML (WAP)
Язык DHTML
Спецификация XML
Руководство по Java
Документация по JavaScript
Язык HOD Text Processor
Интерфейс CGI
Документация по Perl 5
Perl FAQ
Документация по PHP
PHP/FI 2.0
Документация по SQL
Базы данных
Доступ к БД

Рейтинг@Mail.ru Rambler's Top100

Веб дизайнеру
Каталог сайтов Axes.ru


 

Вопрос 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.htm 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
 


Содержание