uploading stylesheet through FTP

How to work with templates and style sheets

uploading stylesheet through FTP

Postby lostrisq » Wed Jul 14, 2010 3:22 pm

Maybe this is a silly question, but in 2.9.0 I can't seem to upload edited stylesheets through FTP anymore.

I always used to alter in dw, save and then overwrite in the tl_files folder. (Of course the sylesheets are attached in the layout)

Now this does not work. I can only alter the stylesheet in the backend. That's just not workable for me....
Am i forgetting something? Or is there some new feature which i have to select somewhere?

Thanks for your help!
lostrisq
User
 
Posts: 75
Joined: Tue Aug 04, 2009 3:48 pm

Re: uploading stylesheet through FTP

Postby Vera » Tue Jul 27, 2010 10:43 am

It would more likely be a rights problem rather then a feature of Contao. Please check with your webhost if the rights to that file might be wrong. :?

I sometimes find I cannot edit files uploaded/created with TYPOlight, the access rights are sometimes set to the Apache user making them inaccessible for the FTP user. :( But it doesn't happen for all of my sites in a predictable way, so there is no real bug to report if it would be a bug at all....
User avatar
Vera
User
 
Posts: 200
Joined: Mon Jun 29, 2009 8:28 am

Re: uploading stylesheet through FTP

Postby thyon » Sun Aug 15, 2010 3:31 pm

PS. I used to edit the stylesheet in my Coda program too and then link the stylesheet in. But since I forced myself to use the Built-in CSS editor, I will never use anything else again.

Normally I have my reset.css, gridpx.css, forms.css, nav-horiz.css, pagination.css, etc. stylesheets in a cssframeworks folder and then import them. This saves TONS of work, as most of them need only minor modifications. With the new 2.9 aggregate stylesheets option, which joins the stylesheets together and then links 1 only, I am loving the style sheet editor even more.

When leo adds in a few more text-transform options, and when we have CSS 3 codes added in, then the stylesheet editor will rock. I love that you can add a border with all its settings, then deactivate it, but you can re-activate it as well, by just clicking the checkbox, and it remembers the values from previously. Another great feature it to turn a style on/off with the toggle publish icon. That is the best! Then you can also group the stylesheet items into Categories, which I am using all the time (News, Site, Forms, etc.).

I can't believe I never wanted to use the Stylesheet editor before. Now, you never have to use an FTP program to edit a Contao website ever again (especially after installing my unzip utility).
User avatar
thyon
Developer
 
Posts: 718
Joined: Wed Jun 10, 2009 10:02 pm
Location: Cape Town, South Africa

Re: uploading stylesheet through FTP

Postby Doublespark » Mon Aug 16, 2010 12:29 pm

At the moment I use UltraEdit to edit CSS files directly via FTP, and link to the CSS files manually in fe_page.tpl. Once I have finished development I then use minify to combine the CSS files.

I would like to start using the Contao CSS editor (Easy access when out of the office and I can use the Contao functionality to minfy with one click) but am concerned about the following:

1) Could I still edit CSS files by FTP if/when appropriate.

2) Could I use CSS files outside of the tl_files folder. I like to keep my CSS files in a separate folder so that they are totally hidden from the client and do not appear in the TinyMCE dropdowns.

Thanks Gary.
User avatar
Doublespark
User
 
Posts: 263
Joined: Fri Jun 19, 2009 5:50 pm

Re: uploading stylesheet through FTP

Postby grapio » Tue Aug 17, 2010 9:02 am

The CSS module in Contao saves the stylesheets in the database. It is possible to edit files through ftp and then afterwards import them in the CSS module.
Jaap Jansma

Walk Wise Webdesign
User avatar
grapio
User
 
Posts: 30
Joined: Mon Aug 10, 2009 10:40 am

Re: uploading stylesheet through FTP

Postby Vascom » Thu Aug 19, 2010 9:45 am

As far as I know, Contao creates the css files itself. After importing it in the backend css-editor and making a little edit in the css-file (using backend css-editor) Contao saves it into the root folder of your site. Correct me if I'm wrong. The css files in the root of your site can be edited with ftp but the css-editor inside Contao is so much easier.

The problem Vera talks about (with the rights) I had before with older TYPOlight versions. Maybe you should try the system check on your hosting platform (http://www.contao.org/configuring-the-live-server.html#system-check-tool).
User avatar
Vascom
User
 
Posts: 17
Joined: Mon Jun 22, 2009 9:43 am
Location: Leersum, The Netherlands

Re: uploading stylesheet through FTP

Postby Doublespark » Thu Aug 19, 2010 4:26 pm

Hi Vascom,

Thanks for pointing that out. Yep, I can see that it has placed the imported CSS file in the root. This means that I can interchange between using FTP and the backend css-editor, which is great, thanks.

I am a little fussy when it comes to my website structures, and would hate to keep CSS files in the root. Is there any way to define a different folder for them to be imported to, for example:

/tl_files/theme/css/
User avatar
Doublespark
User
 
Posts: 263
Joined: Fri Jun 19, 2009 5:50 pm

Re: uploading stylesheet through FTP

Postby Vascom » Thu Aug 19, 2010 5:05 pm

Hi Gary,

Well I'm not a programmer but I think you'll have to write your own module wich overwrites the config of Contao. The file StyleSheets.php at /system/modules/backend is the file where the methods are build.
User avatar
Vascom
User
 
Posts: 17
Joined: Mon Jun 22, 2009 9:43 am
Location: Leersum, The Netherlands

Re: uploading stylesheet through FTP

Postby Doublespark » Thu Aug 19, 2010 5:46 pm

There maybe a way to define the root for CSS files in dcaconfig.php

Maybe another forum user knows if this is possible.

:?:
User avatar
Doublespark
User
 
Posts: 263
Joined: Fri Jun 19, 2009 5:50 pm

Re: uploading stylesheet through FTP

Postby ramjet » Thu Aug 19, 2010 11:45 pm

Not sure about defining the root, but I think you guys need to BEWARE when editing the css stylesheets in root, as I believe cron will overwrite them from time to time, as will the backend CSS editor.

You can edit the ones in root directly via FTP or otherwise and the resultant styles are there for html output ... but they are NOT databased. You would need to reimport that sheet into the editor to have the changes added into the database.
Its a bit of a circle really....Import databases the styles and writes to root. A change in root, reimport, databased, writes to root.

If you don't want to purely use the backend editor then I'd forget about the root css files (just see them as "output"), and keep editable .css files in tl_files somewhere. These will not be used... but you can edit them however you want and they are easier to import once edited (as you can only import from tl_files in the CSS editor).
Hope that helps.
ramjet
User
 
Posts: 534
Joined: Sat Jun 20, 2009 12:24 pm

Next

Return to Templates and CSS

Who is online

Users browsing this forum: No registered users