On Tuesday, January 25, 2011 3:06:48 PM UTC-5, [email protected] wrote: > > How do I move static files (e.g *.png) into folders (i.e. /static/ > images) using admin interface? I can only seem to get them in /static > but want to keep the folders tidy.
I'm not sure moving files via admin is possible -- you're probably better off just doing that via the OS. > > I have 2 base.css files in /static and one in /static/css why? The css and js files in the /static/css and /static/js folders are the ones used by the current scaffolding app (you can see that they are the ones included in the head of 'layout.html'). The files in the root /static folder are probably from the older scaffolding app -- they may be there because you first downloaded an older version of web2py and later unzipped the newer version on top of the old version. > > what does web2py_ajax.html do? web2py_ajax.html includes some Ajax related Javascript functions and code. It is included in the head of 'layout.html', so those functions are available in any view that extends 'layout.html'. It is documented here: http://www.web2py.com/book/default/chapter/10#web2py_ajax.html > Why are ajax components required? Not sure what you mean by "required". See http://www.web2py.com/book/default/chapter/13#Components for an explanation of components, the LOAD function, and the web2py_component Javascript function in web2py_ajax.html (the latter function is rendered by calling the LOAD function in a view file). > There seems to be a space for a logo in layout.html and base.css which > is the best to use? If you put a 'logo.png' file in /static/images, the base.css will automatically display it in any 'div' with id="logo" (which 'layout.html' includes), so you don't have to make any changes to the current scaffolding app for that to work. If you don't want to do it via CSS, you could remove the image line from base.css and instead insert an img tag directly in 'layout.html'. I'm not sure if one method is necessarily better than the other (I suppose using CSS ensures the logo image is defined in only one place, whereas if you use an img tag in the view and end up needing a view somewhere that does not extend 'layout.html' but does require the logo, you would have to repeat the img tag code). Best, Anthony

