Welcome Guest, Not a member yet? Register   Sign In
using dreamweaver with codeigniter? please share your approach
#1

[eluser]niwtxehpa[/eluser]
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:
Code:
index.php
+system
  +application
    +views
      someview.html
+assets
  - images
  - css
  - js

Code:
<base href="http://localhost/WORX/SANDBOX/urlstest/"  />
<link href="assets/css/css.css" rel="stylesheet" type="text/css" media="screen" />

Code:
<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
#2

[eluser]Adam Griffiths[/eluser]
I make a folder called static in the same one as index.php, i.e.

Quote:index.php
application/
static/

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

Code:
&lt;link rel="stylesheet" href="&lt;?php echo base_url()."static/_css/admin.css" ?&gt;" type="text/css" media="screen" /&gt;

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

[eluser]niwtxehpa[/eluser]
[quote author="Adam Griffiths" date="1224713405"]I make a folder called static in the same one as index.php, i.e.

Quote:index.php
application/
static/

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

Code:
&lt;link rel="stylesheet" href="&lt;?php echo base_url()."static/_css/admin.css" ?&gt;" type="text/css" media="screen" /&gt;

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

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).
#4

[eluser]Adam Griffiths[/eluser]
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.
#5

[eluser]Thorpe Obazee[/eluser]
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.
#6

[eluser]niwtxehpa[/eluser]
[quote author="Chamyto" date="1224731466"]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.[/quote]
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?
#7

[eluser]rt30000[/eluser]
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?
#8

[eluser]outrage[/eluser]
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.
#9

[eluser]Leon Stafford[/eluser]
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) ;-)
#10

[eluser]Michael Nielsen[/eluser]
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.




Theme © iAndrew 2016 - Forum software by © MyBB