Tech Talk Discuss PC Hardware, Software, Internet and Other Technology

question for webmasters

Old 05-10-04, 09:33 PM
  #1  
Mod Emeritus
Thread Starter
 
Gallant Pig's Avatar
 
Join Date: Aug 1999
Posts: 15,325
question for webmasters

I'm currently designing a site with a decent amount of pages, probably over 100, maybe 200+ in the future.

I'm working with Dreamweaver MX, I also have the 2004 version, but I prefer using the standard MX version (2004 = very buggy for me).

So there will be no technology involved, I'm coding all this stuff in Dreamweaver/html then manually uploading it to a server. (ugh right? this cannot be changed)

So I have to use templates to make this site as easily updatable as possible.

This is where my question comes in...

What I ideally want to do is this:

I have a main/index page with a header. Each category will need a different header image. I want to create a template for the main/index page, then create templates based off of it (nested templates) for the category pages.

OK so the header on the main page will always be that. The headers on each of the category pages will be different. There IS content on the main page I want to be pushed to each of the category pages.

So like say I have a sidebar on the main page and when I edit it, it automatically updates all of the nested templates I created based off of the main page.

Here's my problem:

I create a main template. I make the header editable. Then I make a nested template based on it for one of the category pages. So now the nested template has an edtiable header. I then edit the nested template so it has the header I want. I then create a page based on that nested template. It still has the old/main/index template header on it. Basically I'm guessing because it's an editable area, it won't PUSH content to its pages, you can fill whatever you want there.

Now I do the opposite and make the area non-editable and when I make a nested template for it, I can't edit the area either (makes sense).

Is there a way around this? I tried Optional Region and basically it seems more boolean oriented, I didn't have much success with this.

OR is there a better program for this? Maybe one that plugs into Dreamweaver MX?

Help! I'm open to any ideas or feedback and possibly willing to compensate you for time spent helping me.

THANKS!
Gallant Pig is offline  
Old 05-10-04, 10:59 PM
  #2  
DVD Talk Gold Edition
 
Join Date: Dec 1999
Posts: 2,708
Are you using any kind of server side code to push the data to the pages? That would make your life *much* easier, especially if you're going to be using this on 100's of pages. As you're using DWMX, ColdFusion or PHP would make a very good addition to what you're doing. CF is standard with DW, but you can download plugins to add PHP support. Add a dB to hold all category/content information and you can serve everything up however you like.
Lampei is offline  
Old 05-10-04, 11:00 PM
  #3  
Mod Emeritus
Thread Starter
 
Gallant Pig's Avatar
 
Join Date: Aug 1999
Posts: 15,325
Followup post. I also know there would be 2 workarounds, but I don't like either:

A. Having a template for each category page (there are over 7 I believe, could be more in the future possibly).

B. Making it so the headers are the same for the main page and the category pages. The reason they are different is for a tab effect.

I'm not sure which one I'd go with if I have to. A would be more work, B would look better.
Gallant Pig is offline  
Old 05-11-04, 07:17 PM
  #4  
Mod Emeritus
Thread Starter
 
Gallant Pig's Avatar
 
Join Date: Aug 1999
Posts: 15,325
Hi Lampei.

Technically I *do* have access to PHP. I guess I lack the skills with the language to make a script that pushes data like that. Would it involve using some sort of call to code from somewhere else? Like SSI?

< PHP >Insert Code from header.inc< /PHP >

?
Gallant Pig is offline  
Old 05-11-04, 08:09 PM
  #5  
DVD Talk Gold Edition
 
Join Date: Dec 1999
Posts: 2,708
If you would like to have a default header that influences how the sub headers perform, then you'll definitely need some sort of include file that is standard for all pages, but can change depending on which directory it's in or what page it's on. One idea would be to have the dB hold a page or directory structure, then query the dB for the section you are in, find a match and add the necessary images/categories for that page.
i.e.
I am in /index.php
In the mydB.dbo.pages, /index.php has a page_id of 2
I then have a "nav_bar" table with the necessary images and links for page_id 2 and populate the nav bar based upon that. There could also perhaps be a header image named header_2.jpg (based upon its page_id) that displays differently than on the home page or sub pages (which would also be named by their page_id)

An alternate method would be to just have a default include (myHeader.php) that you include on all pages as the header file, then within myHeader.php you make all of your checks for which page/section you are in i.e. if $_SERVER['PATH_INFO'] == '/index.php' { include 'foobar.php' } and then you could have some parts that are uniform throughout, and some parts that vary depending on the section.
Lampei is offline  
Old 05-11-04, 08:25 PM
  #6  
Mod Emeritus
Thread Starter
 
Gallant Pig's Avatar
 
Join Date: Aug 1999
Posts: 15,325
That looks great. I'm going to have to code something like that up for the next iteration of this site. It needs to be up ASAP tho so I'm stuck doing it the crappy way I just realized every sub-category page (like a couple for each category) will need its own template as well because of breadcrumbs. Ugh.

Any sort of tutorial or resource that could walk me through what you are describing in greater detail?


Thanks
Gallant Pig is offline  
Old 05-12-04, 08:16 AM
  #7  
DVD Talk Gold Edition
 
Join Date: Dec 1999
Posts: 2,708
www.php.net

That's pretty much where I started (granted I'd programmed in several other languages before, but it's got just about everything you need )

Something you could do, not the best method, but if you named all of the headers the same, you could just have a standard include of myHeader.php
PHP Code:
<? include 'myHeader.php' ?>
in each of the directories (so have myHeader.php in all directories) and then include that in each of your pages, then, if/when you alter your template pages, your include file will be named the same throughout, and will make updating it quite a bit easier.

As to breadcrumbs, I ended up just naming my directories the same as the breadcrumb, and had all breadcrumbs, going to the index file for that directory (as long as you just want "where you are" rather than "how I got here"). So directory structure would be /this_page/that_page/index.php then my breadcrumbs would be Home -> This Page -> That Page (just replaced _ with space) and each of those would go to the index page for that directory.
Lampei is offline  
Old 05-12-04, 12:12 PM
  #8  
Mod Emeritus
Thread Starter
 
Gallant Pig's Avatar
 
Join Date: Aug 1999
Posts: 15,325
Great advice, thanks
Gallant Pig is offline  

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 On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Archive Advertising Cookie Policy Privacy Statement Terms of Service

Copyright 2018 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.