HighDots Forums  

Site hierarchy

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Site hierarchy in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
the ville
 
Posts: n/a

Default Site hierarchy - 07-01-2005 , 11:10 AM






I have a site of around 80 pages. I have put the sub sections within folders.
The index/home page is at the root level. The site navigation menu is coded
into each page.

It is easier to organise stuff using the folders, but it would be easier to do
a global menu change if everything was in the same place using find/replace in
DW. As it is, the menu code for each section is unique ie each section needs to
go up a level (../) before directing to any other section. Having everything on
the same level will enable all the code to be the same.

The question is: Is it better to organise the site like I have (in folders) or
to have all the pages at the same level ?

Is there a 'best practice' for this ?

FYI The site is www.welldynamics.com


Reply With Quote
  #2  
Old   
Kenneth W. Binney
 
Posts: n/a

Default Re: Site hierarchy - 07-01-2005 , 01:17 PM






If as you say, "each section needs to go up a level (../) before directing
to any other section" the links will be the same on all subfolders. If you
are more comfortable with many subfolders, by all means use them, and only
the your index page in the main folder would require different link paths.


"the ville" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I have a site of around 80 pages. I have put the sub sections within
folders.
The index/home page is at the root level. The site navigation menu is
coded
into each page.

It is easier to organise stuff using the folders, but it would be easier
to do
a global menu change if everything was in the same place using
find/replace in
DW. As it is, the menu code for each section is unique ie each section
needs to
go up a level (../) before directing to any other section. Having
everything on
the same level will enable all the code to be the same.

The question is: Is it better to organise the site like I have (in
folders) or
to have all the pages at the same level ?

Is there a 'best practice' for this ?

FYI The site is www.welldynamics.com




Reply With Quote
  #3  
Old   
Philip Herlihy
 
Posts: n/a

Default Re: Site hierarchy - 07-03-2005 , 07:24 AM



I've been grappling with the same problem (with help from this group).

One thing that worked for me was to use Regular Expressions to tease out
leading path component which may be different at various points in the
folder hierarchy. I changed a good-sized site throughout by doing this when
I wanted to add a link to every page. I matched the leading path component
using brackets, and then used the $ notation to re-insert it where
appropriate. Backed up my site first though!

I've also looked at Site-Root-Relative links, but I've learned (here) that
DW will only use what I think of as the Server root, rather than a subfolder
acting as my Site root. No use to me, as I want to publish sites first to a
subfolder of the server on my development machine, and then to a public
server, and the paths are often different.

However, I've been advised (here again!) that templates will automatically
adjust links depending on the relative location of the file they are used
in. This will neatly solve the problem, although I haven't had the chance
to test it out yet.


--
####################
## PH, London
####################
"the ville" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I have a site of around 80 pages. I have put the sub sections within
folders.
The index/home page is at the root level. The site navigation menu is
coded
into each page.

It is easier to organise stuff using the folders, but it would be easier
to do
a global menu change if everything was in the same place using
find/replace in
DW. As it is, the menu code for each section is unique ie each section
needs to
go up a level (../) before directing to any other section. Having
everything on
the same level will enable all the code to be the same.

The question is: Is it better to organise the site like I have (in
folders) or
to have all the pages at the same level ?

Is there a 'best practice' for this ?

FYI The site is www.welldynamics.com




Reply With Quote
  #4  
Old   
the ville
 
Posts: n/a

Default Re: Site hierarchy - 07-05-2005 , 03:39 AM



Thanks fo the input.

Sorry, 'Regular Expressions' what are they? I think I got the drift of what
you were saying (something like a wild card prefix to the link ??) , but could
you give an example of how it's done?

Using templates sounds like the best solution. I already use them for the
footer/copyright for each page.


Reply With Quote
  #5  
Old   
Philip Herlihy
 
Posts: n/a

Default Re: Site hierarchy - 07-05-2005 , 04:59 AM



"Regular Expressions" is the name given to pattern-matching and editing
capabilities built into some software - most commonly in Unix-based tools,
but also in Dreamweaver. If you've never used them, they are astonishingly
powerful, and I've done in 5 minutes (5 seconds processing time after 4m 55
seconds thinking) what would have taken a full day's work to do by hand.

You can match any character with a '.'
You can match any lower-case alpha with '[a-z]'
You can match any alpha or digit with '[A-z0-9]'
You can match any non-digit with '[^0-9]'
You can match any number of any character (except q) with '[^q]*'

You can match the path to an image like this:
src="[^"]*"
.... which translates:
"after the literal characters src= and a quote, include in the matched
string the longest possible string of characters until you get to a quote,
and include that too."

If you put something in brackets (), you can recall it in a Replace
operation with $n, where n is the sequence number of brackets used. So, if
you wanted to change all paths including the folder Dir1 to include Dir2
instead, you could match:
src="([^"]*)Dir1[^"]*)"
(translation: literal characters src= followed by a quote, then a series of
non-quote characters, followed by the literal characters Dir1, followed by
another series of non-quote characters, plus a quote)
.... and you could replace it (using the DW find & replace dialogue) with:
src="$1Dir2$2"
.... and DW would faithfully make this change in every path, even if they are
all otherwise different. Notice that if you needed to you could move the
positions of $1 and $2 - it's an easy way of converting US date format (July
4 2005) to the (correct and logical) format (4 July 2005).

Why not just replace Dir1 with Dir2? What if you had a CSS class called
"Managing-Dir1"?

Regular Expressions aren't hard to learn, although they aren't for people
who can't see the structure in an expression. Expect surprising results
(Oops!) while you're learning, so back up first! You'll find explanations
in DW Help, on the Macomedia website, and all over the Internet. One
caution: DW Regular Expressions have a few minor syntax differences from the
classic Unix style, so it might make sense to get the hang of REs on a
tutorial somewhere, then focus on the (excellent) DW implementation. Every
hour you spend on them will be repaid a hundred-fold over time.

See Help, and also:
http://www.macromedia.com/devnet/mx/...pressions.html

http://www.oreilly.com/catalog/regex/index.html (Unix style)

--
####################
## PH, London
####################
"the ville" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thanks fo the input.

Sorry, 'Regular Expressions' what are they? I think I got the drift of
what
you were saying (something like a wild card prefix to the link ??) , but
could
you give an example of how it's done?

Using templates sounds like the best solution. I already use them for the
footer/copyright for each page.




Reply With Quote
  #6  
Old   
the ville
 
Posts: n/a

Default Re: Site hierarchy - 08-02-2005 , 03:42 AM



Philip - the Asset/Library option you mention is the answer.

I've used the Assets - Library feature in Dreamweaver to create the generic
navigation code. This is based on the home page navigation that lives in the
site root level.

When the Asset is added to another web page it takes account for the location
of the page ie whether it's in a subfolder or not.

It allows me to use folders to organise my site plus to have the navigation
code in one place so I can modify it 'site wide' by editing the Library asset.
And, because my navigation is a dropdown menu based on a CSS unordered list,
it's very easy to make site-wide changes to the menu.

It works perfectly. Slick.


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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.