Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dreamweaver Equivalent to Front Page "Include" command

Status
Not open for further replies.

Linda354

Technical User
Jan 2, 2002
59
US
I'm trying to find Dreamweaver's equivalent to Front Page's "Include" command.
 
tell me what it does and I'll tell you the equivalent
 
Are you referring to a server-side include? Or are you referring to oneof FP's web-bot functions? DW is a serious web designer's program and does not support web-bot and front page extensions. It does have shortcuts for server-side includes (SSI)which can link a common file to your pages making mass updates easy.

Or are you referring to include date stamp? DW can do that also so that the date is updated everytime you edit a page. A litle more info would be helpful. When in doubt, deny all terms and defnitions.
 
I've figured out that Server Side Include is the equivalent to FP's "Include" feature. I found a thread here from January, 2001 "Server Side Include not working, please help." I seem to be at the point this previous poster was at when the thread ended.

I tried using an SSI in my template, but that did not show up. So I decided to make that table (a left navigation bar) editable, then add the SSI to each page. Since I only have seven pages so far, this was acceptable. After some difficulty and a few "Illegal Operation" crashes I managed to get the SSI on all pages. When I preview the pages I only see the SSI text on the page I begin previewing from. All other pages I click to in Preview are mising the SSI text.

It seems every time I've mentioned here that I'm moving from FP to DW somebody wants to signify how lame FP is, but so far from my experience DW is no less quirky in its behavior, perhaps moreso. I remember FP's learning curve was a pain at times. I guess DW's superiority must lie in its advanced capabilities. It sure doesn't lie in being user friendly and intuitive.

I wasted a day because I could not find any equivalent to a "publish" or "upload" command. A friend had to tell me the equivalent is "put." Now who in the world would ever think "put" was a synonyn for "Publish?" hahaha. Don't mind me, just blowing off steam.
 
Intuitive it is not... but worthwhile to learn. The SSI capabilities are dependent also on your webserver. Some webhosts insist that the pages be named .shtml,a nd some have explicit syntax for calling up the SSI inclusions. The best bet for SSI inclusions is to save them as .txt files, and not have any <head> or <body> tags. Use other HTML tags though for formatting, unless you are using CSS. When in doubt, deny all terms and defnitions.
 
I've contacted my webhost and was told I should be able to keep the .htm extension. I have the SSI inclusion saved as .txt. with no other codes. I don't want to start using .shtml for fear it will interfere with search engine rankings. I have been advised that .asp extensions may rank lower, so I'm apprehensive about .shtml.

The main reason I'm trying to use SSI at this point is that I'm apprehensive about DW's coding. I created navigation buttons with mouseover etc. commands and all the coding involved is within the <body> command. I use Web Position Gold's Page Critic and it seems to be choking on that command, which makes me worried search engines may choke on it, also.

Aside from that, I would just like my pages to be as clean as possible for the engines to read. I don't get why this feature is so hard to use.

The site I'm working on is at
 
SHTML pages should not rank any lower in search engines than HTML. Most web pages you go to will have some sort of mouse-over (actually it may be ober-used IMHO) so I doubt that the scripts will cause web search engines to choke.

I do recommend using SSI though only because it makes updating a series of pages so much easier. Make sure that you have the proper syntax or command string to call the included file. Also, on some Unix hosts, you will have to deal with CHMOD.

If you have WS-FTP then CHMOD is a cinch. Right click on the files on the remote host, and select CHMOD. You have 3 sections, owner, group and other. Each has 3 check boxes, read, write and execute. read = 1, write = 2 and execute = 4. Add them together to get the code. CHMOD to 755, the 7 being owner set at rea, write & exe. The 5 is group, and it read & execute with write being unchecked. The second 5 is other set the same as group. Never do a 777. if you are on an NT server, ignore all that, you won't need CHMOD. When in doubt, deny all terms and defnitions.
 
Am I correct in my assumption that an SSI cannot be used in a template?
 
Hi Linda,

You're going to hate when I say this, but don't use templates. I made the mistake of trying it when I first got DW. Other people may be okay with it, but it really frustrated me.

I have a suggestion for you. I use the scripting language 'php'. It's great for includes. You don't even have to know the language to use it effectively.

I took a look at you're site and I'm assuming you're problem is the links at the bottom right of all your pages.
Make a new page and call it say 'footer.htm'. Be sure all the links have the full URL. Go into code view and delete the html, body, title tags -they aren't needed.

Rename all your page extensions .php -Most web hosts accept 'php' with NO extra charge. On all the pages where you want this footer put '<?php include (&quot; ?>'
Now if you ever have to change those links you just have to edit the one file 'footer.htm'.

Have a look at this site that I'm working on now. This is my development server.
The bottom of all the pages have a links footer using the very thing that I just described.


 
Thanks for that info. Actually, it's the buttons on the left that are giving me grief. I use Web Position Gold's page critic to analyze keyword usage and it does appear that all that code crammed into the <body ...> command is throwing off what the engines are going to think my content is and how much weight to give my keywords.

I fooled with it a little more and it appears using an .shtml extention will make the include work. I'll see tomorrow when I try it on all the files.

I hope I'm not going to be disappointed with the template feature. There's a whole lot of formatting I can change in a few minutes, for the whole site, built into my template. I don't want to loose that. I've been using templates ever since the first version of Microsoft Word a million years ago. I don't EVER want back to page after page of tedious revisions.

I'll go over to the search engine forum at Jim's world and see what people say about these offbeat extensions.
 
Well, I've made progress. One of the moderators at Jim's World Search Engine forum told me that an shtml extension should not do any harm with SE rankings.

I've got everything to work with the &quot;server side include&quot; command the only problem now is -- the MOUSE OVERS DON'T WORK!! HEHE. I've done all this work-around stuff so that I could have some flashy buttons, finally got it to work, except the buttons aren't flashy anymore. Only one button -- the one on the index page for &quot;Home&quot; changes color with mouseover

Anybody have any suggestions?

Here's the site:
 
Hello Linda354!

I think it's very easy thing to fix. You need to call image to be roll-overed by its full exact name but you don't.

Let's compare two buttons, well working one (Home) and not working one (Creating Your Site). Here is your code:

<a href=&quot;index.shtml&quot; onClick=&quot;MM_nbGroup('down','group1','Web_Design_Agencies_Checking_Them_Out',
'Images/Down/Home.jpg',1)&quot; onMouseOver=&quot;MM_nbGroup('over','Web_Design_Agencies_Checking_Them_Out',
'Images/Over/Home.jpg','Images/OverDown/Home.jpg',1)&quot;
onMouseOut=&quot;MM_nbGroup('out')&quot;>
<img name=&quot;Web_Design_Agencies_Checking_Them_Out&quot; src=&quot;Images/Up/Home.jpg&quot; border=&quot;0&quot;
onLoad=&quot;&quot; width=&quot;168&quot; height=&quot;61&quot; alt=&quot;Web Design Agencies Checking Them Out&quot;>
</a>

<a href=&quot;Create.shtml&quot; onClick=&quot;MM_nbGroup('down','group1','Create','Images/Down/Create.jpg',1)&quot;
onMouseOver=&quot;MM_nbGroup('over','Create','Images/Over/Create.jpg','Images/OverDown/Create.jpg',1)&quot;
onMouseOut=&quot;MM_nbGroup('out')&quot;>
<img name=&quot;Creating_Your_Website&quot; src=&quot;Images/Up/Create.jpg&quot;
border=&quot;0&quot; onLoad=&quot;&quot; width=&quot;168&quot; height=&quot;61&quot; alt=&quot;Creating Your Website&quot;>

</a>


You see that you don't call images by its exact name... You should!!! :)
Good Luck! :)
 
Thanks for looking at my code. I'm trying to see how these two buttons are coded differently but I can't, though it's probably not something to worry about at the moment. In the meantime, I decided to just start from scratch with my navigation bar on the theory that in all the bungling revisions I've done, something's likely corrupted.

I just went and looked at the code that's online and I don't see any include command, all the buttons are on every page. I have no idea what's going on. I'm just going to run through the process again and see what happens.
 
Okay, this is what I've learned. You CAN put your include command in your template, but you have to go into your code and take out the &quot;../&quot; before the name of your include file so that the text the template kicks out will look for the include .txt file on the same level as the parent document. (Your include .txt file must be on the level as the parents document.)

Creating my include .txt file worked for me when I created a table first, then used the navigation setup on the object bar. I then selected this navigation table, cut it from the parent doc, then created a new file, went into code view, deleted all the intial coding, went back to design view and pasted in my table. Went back into code view, cleaned it up so it was easier for me to read and understand. Check the parent doc, it may still have all the javascript at the top which can be deleted.

I think I've accomplished what I set out to do -- remove all the coding that could throw off the weight of my keywords the search engines will calculate. I've also got shared content that's in an include file that only needs to be edited once to change all pages -- although it's a bit cumbersome to edit. The only way to get my include .txt file into design view to edit it, that I can see, is to create a test.htm page, go into code view, add lots of space after the <body> command and paste in my include .txt file. Then I can edit in design view. But before I save I have to remember to go in and take out all the top and bottom code from the &quot;new&quot; doc and save it as my include .txt file.

Hope I've explained this well enough to make any sense. Oh, I did have to make my doc's .shtml to work on my server, though that may not be necessary with another server.
 
Oh, one other thing. Now that I've taken all this coding out of my documents, the results I'm getting from Page Critic (Web Position Gold) is much different than before, and much more believable.
 
>>(Your include .txt file must be on the level as the parents document.)
<<

Not completely true... if you include the full path ( it will include the files. And the great thing about SSI is now you have one file for your menus which you can cahnge and it changes all documents sitewide. If you set up the header and the footer as SSI, then you can change the entire site easily without editing a single .html page. Then if you begin to learn about CSS and include a style sheet you can change the entire look with a few strokes of the keys. And that will eliminate the need to mess with templates unless you really really want to work that way. Personally I think they put too much extraneous code into my pages. I will make one blank master page that I will use as a template and leave DW's template feature sleep!

Glad to see that you have figured it all out! When in doubt, deny all terms and defnitions.
 
Viol8ion wrote:

&quot;if you include the full path
( it will include
the files.&quot;

Do you mean that if I include this full path the include *.txt file can be anywhere on the site?

I've been using CSS, or earlier incarnations of it in the first word processors, as much as I can for many years, but I would like to know an easier way to create one. Isn't there a way to generate a fairly comprehensive style sheet for a particular font style, etc.? Right now I've defined three or four elements (body, h1,h2, h3, bullet, etc.) but would like it to be set up to handle more.

FP will generate an extensive style sheet via its themes feature, but I've never been able to use it as a standalone. I crashed real hard trying that once and never touched it again.
 
>>Do you mean that if I include this full path the include *.txt file can be anywhere on the site? <<

Yes, I have a simple script that I use for page counters, the counter script resides in my cgi-bin and I call it from any page anywhere on my site (I have even run it for other sites that did not support cgi, where I had the counter working for pages on an NT server elsewhere) so you can call the page from anywhere, in theory. That, of course, is not recommened :)

This site is an excellent tutorial on CSS. I am still teaching myself CSS, being self taught in HTML and I have 8 years of bad habits to break in order to make myself W3C compliant :p. CSS is so great when you set it up properly and makes updating the look of the site so easy. It does get a bit complicated when you try to support NN4.7.

What vs of DW are you suing? DW will let you easily set up CSS, it took me 5 minutes to figure it out (with the users manual open) and I was quickly editing and adding styles. CSS leans out your code significantly, because you are getting rid of all the <font size=&quot;1&quot; face=&quot;arial, helvetica&quot;><b>blah blah</b></font> tags that appear after every <br> and every <p> etc... When in doubt, deny all terms and defnitions.
 
Thanks for the link. I bookmarked it and will be sure to read it through. I'm on DW 4. I found the CSS box and was able to create the styles I have readily enough.

What I'm thinking I'd like is to be able to go through a few dialogue boxes, specify what font I want site-wide, then go in and tweak variations on size, weight, etc. for specific styles. Then it generates a style sheet for me with all the html attributes (correct term?) themed for that site. Anybody know of a program that would do this?

What does W3C stand for? And NN4.7?

 
W3C is the world wide web consortium. ( They decide on standards for the that no matter what browser you use you will see pretty much whatthe web designer intended. This is not the case today, which you will see if you look at the same sites using IE, Netscape(NN) oe Opera. NN4.7 is Netscape 4.7 which works differently from NN6.0 (Gecko) which was designed to W3C specs, as is IE5.0 and 6.0. IE4.0 is, to a lesser degree. Opera 3.0 is not, Opera 4.0 is, and Opera 5.0 behaves differently than 4.0. Confused yet? Wait till you try to make a website work on all of those flavors!

Macromedia's site has about 500 or so extensions that work with DW to extend it's capabilites. Most are free downloads. Go to the site and look for Dreamweaver, and then extensions... there are many that deal with CSS and help you manage them. When in doubt, deny all terms and defnitions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top