EllisLab text mark
Advanced Search
     
using dreamweaver with codeigniter? please share your approach
Posted: 22 October 2008 11:45 AM
Joined: 2008-10-22
3 posts

Hi there,
If you are using dreamweaver for for your CI projects, please share your approach regarding urls for css, js, images inclusion.

I tested various solutions presented on the forum, but none of them works for me.

I want to:
- be able to preview my html files in dreamweaver, with images and css styles applied
- not be forced to use absolute paths ( I work locally and don’t want to modify all the paths when I move the files online).
- not use $this->config->item(base_url) - the preview in dreamweaver will not work

I had some success with the following approach:

index.php
+system
  
+application
    
+views
      someview
.html 
+assets
  
images
  
css
  
js 
<base href="http://localhost/WORX/SANDBOX/urlstest/"  />
<
link href="assets/css/css.css" rel="stylesheet" type="text/css" media="screen" /> 
<img src="assets/images/intercontinental.jpg" /> 

The above would work great; I would only change the base when uploading the site. In browser everything is ok. But… BUT not in dreamweaver wich seems to ignore (or not be able to process) the base tag.

Please show me your winning approach on this.

Thank you,
Emi

 
Posted: 22 October 2008 02:10 PM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2008-05-04
356 posts

I make a folder called static in the same one as index.php, i.e.

index.php
application/
static/

Inside static I have folders for css, images etc, and then reference the CSS like this.

<link rel="stylesheet" href="<?php echo base_url()."static/_css/admin.css" ?>" type="text/css" media="screen" /> 

I just put ../_img/imagename.png in the CSS in relation to images.

 Signature 

[ Adam Griffiths - Freelance Web Applications Developer ]
[ Follow me on Twitter ]

 
Posted: 22 October 2008 02:43 PM   [ # 2 ]   [ Rating: 0 ]
Joined: 2008-10-22
3 posts
Adam Griffiths - 22 October 2008 06:10 PM

I make a folder called static in the same one as index.php, i.e.

index.php
application/
static/

Inside static I have folders for css, images etc, and then reference the CSS like this.

<link rel="stylesheet" href="<?php echo base_url()."static/_css/admin.css" ?>" type="text/css" media="screen" /> 

I just put ../_img/imagename.png in the CSS in relation to images.

Thank you for your input, but I need to be able to have the wysiwyg-ness of dreamweaver; the php code would not execute in dreamweaver, therefore no css sheet would be attached (as far as design view is concerned).

 
Posted: 22 October 2008 03:25 PM   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2008-05-04
356 posts

If you’re viewing PHP files, they won’t show in dreamweaver anyway since it only displays HTML, so any dynamic data won’t be showed.

 Signature 

[ Adam Griffiths - Freelance Web Applications Developer ]
[ Follow me on Twitter ]

 
Posted: 22 October 2008 07:11 PM   [ # 4 ]   [ Rating: 0 ]
Joined: 2008-04-19
1153 posts

I usually code in code view and never use the wysiwyg features. I don’t feel in control and besides I think the wysiwyg features actually make coding hard for me.

 Signature 

Thorpe Obazee

 
Posted: 23 October 2008 01:56 AM   [ # 5 ]   [ Rating: 0 ]
Joined: 2008-10-22
3 posts
Chamyto - 22 October 2008 11:11 PM

I usually code in code view and never use the wysiwyg features. I don’t feel in control and besides I think the wysiwyg features actually make coding hard for me.

I know what you mean - even if I use dreamweaver I still code css and most html by hand. But I need a proper preview for design heavy websites, with lots of images and background images. How would you handle the development of such sites, with a strong design component?

 
Posted: 23 October 2008 05:34 PM   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-10
145 posts

If you have a view or template that you need wysiwyg for, why not just put a link directly to the css and images temporarily until you get it how you’d like. Then just take out the css link and fix the path to the images?

 
Posted: 23 October 2008 10:02 PM   [ # 7 ]   [ Rating: 0 ]
Joined: 2008-02-08
33 posts

I had pretty much given up with wysiwyg in Dreamweaver even without the path issues because it doesn’t seem to manage complicated css layouts very well anyway.
I always ended up having to preview on the server and tweak things from there.

 Signature 
 
Posted: 27 February 2009 12:20 AM   [ # 8 ]   [ Rating: 0 ]
Joined: 2009-02-07
52 posts

I suggest running a local/test server for so many reasons. One is that it’s faster than Dreamweaver and less likely to mess with your code!

You can run a web server for example on a USB stick in Win or Mac now which is really handy.

It pretty much guarantees WYSIWYG WFWYLS (Without Funking With Your Live Site)  wink

 Signature 

Leon Stafford

Media Temple loves me - use “leonstafford” at checkout for 15% off of all (gs), (ve) and (dv) server hosting plans!

 
Posted: 27 February 2009 12:27 AM   [ # 9 ]   [ Rating: 0 ]
Joined: 2009-01-30
42 posts

Don’t use Dreamweaver for the coding side of the project. Use Netbeans for the code, you can run it locally then open up the same files in DW add your CSS. then run locally again. And bam, your done.

P.S I didn’t read all the replies so if there is a same principle already spoken don’t hassle me.

 
Posted: 27 February 2009 12:28 AM   [ # 10 ]   [ Rating: 0 ]
Joined: 2009-01-30
42 posts
outrage - 24 October 2008 02:02 AM

I had pretty much given up with wysiwyg in Dreamweaver even without the path issues because it doesn’t seem to manage complicated css layouts very well anyway.
I always ended up having to preview on the server and tweak things from there.

same here. almost easier to hand code some things.