Part of the EllisLab Network
   
 
using dreamweaver with codeigniter? please share your approach
Posted: 22 October 2008 10:45 AM   [ Ignore ]  
Summer Student
Total Posts:  3
Joined  10-22-2008

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

Profile
 
 
Posted: 22 October 2008 01:10 PM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  374
Joined  05-04-2008

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 ]

Profile
 
 
Posted: 22 October 2008 01:43 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  3
Joined  10-22-2008
Adam Griffiths - 22 October 2008 05: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).

Profile
 
 
Posted: 22 October 2008 02:25 PM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  374
Joined  05-04-2008

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 ]

Profile
 
 
Posted: 22 October 2008 06:11 PM   [ Ignore ]   [ # 4 ]  
Lab Technician
RankRankRankRank
Total Posts:  1264
Joined  04-19-2008

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 

PinoyTech - Web Development Blog

Profile
 
 
Posted: 23 October 2008 12:56 AM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  3
Joined  10-22-2008
Chamyto - 22 October 2008 10: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?

Profile
 
 
Posted: 23 October 2008 04:34 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  168
Joined  10-10-2008

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?

Profile
 
 
Posted: 23 October 2008 09:02 PM   [ Ignore ]   [ # 7 ]  
Grad Student
Rank
Total Posts:  33
Joined  02-08-2008

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 
Profile
 
 
Posted: 27 February 2009 12:20 AM   [ Ignore ]   [ # 8 ]  
Grad Student
Rank
Total Posts:  56
Joined  02-07-2009

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
China Dropship Partial CI
China Quality Control Migrating WP to CI

Profile
 
 
Posted: 27 February 2009 12:27 AM   [ Ignore ]   [ # 9 ]  
Grad Student
Rank
Total Posts:  42
Joined  01-30-2009

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.

Profile
 
 
Posted: 27 February 2009 12:28 AM   [ Ignore ]   [ # 10 ]  
Grad Student
Rank
Total Posts:  42
Joined  01-30-2009
outrage - 24 October 2008 01: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.

Profile