Mysteries relating to moving my own template, CSS & images into CMSMS.

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
symbolist
Forum Members
Forum Members
Posts: 18
Joined: Sat Aug 16, 2008 5:14 pm

Mysteries relating to moving my own template, CSS & images into CMSMS.

Post by symbolist »

I created a brief html template, CSS, and 3 images. The CSS is handling 2 of the background images for the body bg and the header bg. The other image is called by the HTML for the logo in the header.

All this works.

I plugged in basic CMSMS tags as mentioned in the docs.

Took me two days to figure out that I couldn't upload the files and images into the upload and upload/images dir and then simply install them via Admin. I had to find in a forum post that I had to copy/paste the html and css contents into Add Template/CSS forms, which I did. The images are still in the upload dir.

Added a page properly, applied the CSS to the page, made it a content page, and child of another so I could see the menu work, etc.

When I browse to the new page, I see the dummy content I entered, the unstyled menu text, and some of the CSS controlled divs (with their colored backgrounds).

However, a great lot of the CSS is not working, and the images aren't displaying at all. It all worked prior to copy/pasting/uploading.

1. Apparently, I'm going to be told this is a stupid question (and later I'll agree:), but I can't find anywhere in the documentation that discusses or shows where to put the new images in the filesystem or whether there's a systemic way to "install" them. Where do they belong? Will they live in the uploads directory forever?

1a. What dir does CMSMS consider the home directory?

2. When I create (copy/paste) a new template, should I only be copying in the contents of the tag? Or can page specific info stay in? Are the tags redundant?

3. Any thoughts about why my various text styles aren't working? They seem to be placed correctly in the template, and worked before.


TIA,
TJ
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Mysteries relating to moving my own template, CSS & images into CMSMS.

Post by Dr.CSS »

In this thread of the forum, unless you supply for template/CSS you will need to show a link to problem page, other wise it's just a guessing game...

If you look at the default install templates you should get an idea how it all works, a lot of time and effort went into commenting both the templates and the CSS to help understand what is doing what...

OH and read this...

http://wiki.cmsmadesimple.org/index.php ... d/Designer
User avatar
RJK
Forum Members
Forum Members
Posts: 59
Joined: Mon Nov 16, 2009 8:58 pm
Location: France

Re: Mysteries relating to moving my own template, CSS & images into CMSMS.

Post by RJK »

TJ  - there are a couple of video tutorials around which may help. One I found from a quick search is here: http://www.youtube.com/watch?v=T0g9WkCwO7s. Actually it might be interesting for you to go to youtube.com and type in CMS Made Simple and see what comes up. There are a fair few tutorials there which may help along the way.

Regarding your CSS not working since getting it into CMSMS....unfortunately it's fair to say you've messed up somewhere! If it worked before, and some of it still does, then somewhere you've made a typo or something.

Good luck!

Richard
kendo451

Re: Mysteries relating to moving my own template, CSS & images into CMSMS.

Post by kendo451 »

You need to make sure the image urls are correct in your stylesheet.  You are problably using relative urls, when you should be using them from the site root.

The reason is that all stylesheets in CMSMS act as if they are place in the site root so:

background-image:url(../uploads/images/foo.jpg);

that will not ever work.

It should be like this:

url(uploads/images/foo.jpg)

or it should be like this:

url(./uploads/images/foo.jpg)  -> This one works on XAMPP and on the production site so I use this myself

Also you should be aware that users can edit/delete anything in the uploads folder, including the images folder.  So I generally put my CMS template images in the images directory.  You can edit that with FTP, and the CMSMS users can't mess it up with the File Manager or Image Manager.

I would not use images/cms because everytime you upgrade your CMS Made Simple to the new version it will overwrite that folder and if your images have the same name they will get overwritten.

So paths to the images folder are like so:

url(images/foo.jpg);

or

url(./images/foo.jpg);
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Mysteries relating to moving my own template, CSS & images into CMSMS.

Post by Dr.CSS »

I never use the root/images folder, always uploads/themename folder for template images...
kendo451

Re: Mysteries relating to moving my own template, CSS & images into CMSMS.

Post by kendo451 »

I guess that it depends on whether you plan to use the Theme Manager or not - as that uses uploads.

I generally try to make the sites so that users can't break them.  I guess you could make a theme folder in uploads and then change the permissions on that folder to 555 so the users can't delete the images from file manager.
Post Reply

Return to “Layout and Design (CSS & HTML)”