View Full Version : Dreamweaver Help Needed - Content
velawan 04-17-2005, 04:15 AM Hi
I just need some help. I am creating a website and I want to create a small box (table) where I want to put my 'News Update'. Its a dynamic box where I want to change the news as and when it is necessary. What is the Best way to do it?
What I am currently Doing:
I created a small table (300pix X 300pix) using css on all my pages and given an ID. The table is given the CSS ID. I then create a jpg of the news and use it as a CSS table background. So whenever I want to change the news, i create a new jpg and replace the old jpg.
I dont think this is the best way to do it. The news table is in all my pages (about 8 pages). I want to update all pages simultaneoulsy on updating a single page. Any suggestions?
All assistance would greatly be appreciated.
Kind regards
velawan
rapture9 04-17-2005, 06:41 AM open all the pages, copy the code of the table or whjatever you want to change.... hit CTRL + F (for the find feature), paste the code you want to change into the Find box, change Find in to Open Documents, and change Search to Source Code. Then under Replace, type in the code you want to replace it with. Then hit replace all, and all pages should change, unless you used different coding for them all.
and if your asking the best way to update news, a news script would be much easier than updating a picture or even typing in the news by hand with all the html on the news page...
ozwebfx 04-17-2005, 11:45 AM just upload a new jpg image
ssmith 04-17-2005, 08:43 PM Hi Velewan,
You could also make the news table an include file in each of the representations; that way you only need to update the include file each time.
velawan 04-18-2005, 03:59 AM Thanks guys.
Rapture9
Any recommedations on where I can get the news script?
regards
velawan
thanks rapture9 for posting that, just the answer i was looking for.
Stefan [TeraNome] 04-25-2005, 08:05 PM There is an easy way to do that: use Libraries.
First of all, define your website, and let DW to index it. Open an empty document, and save it as test.htm. Then, create an empty table. After that, put some text in. When you have the text, select the whole table, click Modify > Library > Add object to Library. Ok, now the table should become yellow, and you should see it as an Library item in your Properties panel.
Now, let's say that you want to have the same table on 10 pages: just copy and paste it on all the pages. Next time when you need to change the news open DW and look at the right side: you should see the Library panel. In that Library panel you can see the library object that you have created for the website. Double-click it, and make your changes. DW will say: Do you want to update this Library item on all the pages? You click Yes and DW will automatically replace the code.
Good luck!
velawan 04-26-2005, 02:37 AM Stefan
big thank you. its a wondeful and excellent idea. really appreciate it.
kind regards
velawan
Haddy 04-26-2005, 04:00 AM Personally I normally use this way for basic sites that dont require a backend (area where you can change different options such as content and such). I will assume your hosting the site on a server with PHP.
Just add the code <?php include "news.html" ?> to the table adn create the news.html page. All you have to do is edit the news file and upload it. Very simple and clean and your also not tied down to having to use dreamweaver...
Stefan [TeraNome] 04-26-2005, 05:11 AM Originally posted by velawan
Stefan
big thank you. its a wondeful and excellent idea. really appreciate it.
kind regards
velawan
You're welcome! :)
BTW, Haddy's idea is also good, but you will have to change your files extensions to .php if you want to use it...
velawan 04-26-2005, 06:25 AM Haddy,
Thanks for the idea too. I posted the question sometime ago and finally I got two very good ideas. Just one thing Haddy, let me get it right. I do the following:
a) Insert the following code in the table i create in my webpage:
<?php include "news.html" ?>
b)I create a new page namely 'news.html and type in the news?
Do I have to create tables in the news.html?
If my table is small in the main page but the news.html is bigger/wider in text content than the table, what does happen?
I should have test it but I havent as I am having problem with the laptop I have and the dreamweaver installation.
Thanks a lot.
velawan
the_pm 04-26-2005, 07:29 AM The beauty of Haddy's method is that you can do it with any text editor. You probably have Notepad on your computer, and there are quite a few good ones available you can download for free. Also, your Dreamweaver disk comes with a gem of a program tucked away on it called Homesite. It is my design software of choice. I install Homesite and throw Dreamweaver away. Try exploring the CD until you find the Homesite folder on it.
Do I have to create tables in the news.html?Only if your design calls for them. The included document can be just the text markup if you'd like.
If my table is small in the main page but the news.html is bigger/wider in text content than the table, what does happen?Yes. Unless you do something crazy like float a table, cells will expand to accommodate content. This goes for increased content and changes in font sizes by your end users.
velawan 04-26-2005, 09:24 AM Hi the_pm
Does homesite have all the features of dreamweaver? any particular reasons you like homesite compared to dreamweaver? Would really appreciate your feedback on this.
the_pm 04-26-2005, 09:52 AM Homesite is a text editor. You use it when you are familiar with writing code, or when you're interested in learning more about writing code.
The debate has raged many times in this forum whether it's better to use a WYSIWYG editor or a text editor. I personally fall heavily on the side of text editing, but I won't go into why - your thread will end up getting comprehensively hijacked if this discussion gets going again ;) Suffice it to say using the WHT search function will yield all of the argument for and against switching to text editors. I recommend seeking these discussions out.
I like Homesite because it is one of the most comprehensive text editors made. Homesite's construction is the basis for Dreamweaver's code view mode, but Homesite is slightly more robust and can be manipulated a bit more. I've found Dreamweaver to be utterly useless and a waste of time and money personally.
Haddy 04-26-2005, 04:24 PM Originally posted by velawan
Do I have to create tables in the news.html?
You dont unless the content needs it.
Originally posted by velawan
If my table is small in the main page but the news.html is bigger/wider in text content than the table, what does happen? To behonest Ive never had a problem with it as Ive used this method on www.technexus.net (http://www.technexus.net/reviews.php) the left part of the page is called from the left (http://technexus.net/left) file
velawan 05-04-2005, 01:03 PM Originally posted by Stefan [TeraNome]
You're welcome! :)
BTW, Haddy's idea is also good, but you will have to change your files extensions to .php if you want to use it...
I was trying this method but it doesnt seem to work. Which file/files do I have to change the extensions to .php? All my files are in .htm
I didnt change any.
kind regards
velawan
Haddy 05-04-2005, 03:04 PM The mail file needs to have the php extention. Any file that contains <?php ?> needs to have it or else it will just show up as regular non parsed text.
|