Page 1 of 1

Some questions

Posted: Wed Jan 16, 2008 7:35 am
by Fabien
Hi,

I am trying to creat a template for S9Y and I got weird results. So I have some (very stupid) questions:
1. When I look at the code generated for a page, I see a lot of classes that are not defined in the CSS. Normal?
2. If yes, what is mandatory?
3. All the templates I looked used the same names for the div (mainpane, sidebar) and the same div structure. The others pages of my site use a more complicated structure that I want to mimic on my blog. Is it possible? Are the names of the divs used somewhere in the programs and are they mandatory?

Thanks for your indulgence.

Posted: Wed Jan 16, 2008 11:26 am
by Fabien
Another question. When I look at the code of the page generated, the page is linked to a css named serendipity.css. What is it? How is it created? What is in it?

If I use the CSS of my site without any modification, the result is different on the serendipity page and on the others one. So, it's clear that my ccs is modified by serendipity or partially used.

Thanks, Fabien

Re: Some questions

Posted: Wed Jan 16, 2008 11:49 am
by yellowled
Fabien wrote:1. When I look at the code generated for a page, I see a lot of classes that are not defined in the CSS. Normal?
Yes. You can never have too many classes, but you don't have to use them all. Having a lot of classes gives you the option to style almost anything individually. If you don't need to do that, just leave that particular class or id alone in the CSS :)
Fabien wrote:3. All the templates I looked used the same names for the div (mainpane, sidebar) and the same div structure. The others pages of my site use a more complicated structure that I want to mimic on my blog. Is it possible? Are the names of the divs used somewhere in the programs and are they mandatory?
Basically, you can use a different div structure by editing the .tpl files of your template or copying from the default template and editing them if your current template doesn't provide a particular .tpl file. The most likely candidates are (based on my experience with porting template to s9y, which often presents the same problem): index.tpl, entries.tpl, sidebar.tpl.

However, some plugins and/or parts of s9y seem to "look for" certain parts - I can't really give you more detail on this, but I guess Garvin can :)

YL
Thanks for your indulgence.[/quote]

Re: Some questions

Posted: Wed Jan 16, 2008 3:21 pm
by garvinhicking
Hi!

That's true, some s9y plugin use that DIV names. The best thing to make sure if you use one of them is to search all your s9y files for the name of that DIV.

But there are no critical functions that depend on the same DIV name.

Regards,
Garvin

Posted: Wed Jan 16, 2008 3:26 pm
by Fabien
Thank you for your answers.

And what about this serendipity.css (my second message)?

Posted: Wed Jan 16, 2008 3:48 pm
by garvinhicking
Hi!

Serendipity.css is a virtual file created by your template/XXX/style.css file, routed through serendipity.css.php. It also contains CSS codes emitted by event plugins.

Regards,
Garvin

Posted: Wed Jan 16, 2008 3:55 pm
by Fabien
So it's possible that there is some conflict between the code generated by some event plugins and my style.css file??? How to verify what is exactly in this virtual file?

By the way, another question? Is it possible to test a template without changing the default template seen by visitors?

Thanks, Fabien

Posted: Wed Jan 16, 2008 4:08 pm
by garvinhicking
Hi!

Yes, plugins like the "Markup: CSS Printing" would use their own CSS styles to allow you to print entries. If you rename DIV classes, the print plugin would no longer format the appropriate DIVS, since you don'T have them.

You would need to evaluate each markup plugin that you use and check out what HTML/DIV tags they refer to.
By the way, another question? Is it possible to test a template without changing the default template seen by visitors?
You can install the template chooser plugin(s).

Regards,
Garvin

Re: Some questions

Posted: Thu Jan 17, 2008 8:00 pm
by abdussamad
Fabien wrote:Hi,

I am trying to creat a template for S9Y and I got weird results. So I have some (very stupid) questions:
1. When I look at the code generated for a page, I see a lot of classes that are not defined in the CSS. Normal?
2. If yes, what is mandatory?
3. All the templates I looked used the same names for the div (mainpane, sidebar) and the same div structure. The others pages of my site use a more complicated structure that I want to mimic on my blog. Is it possible? Are the names of the divs used somewhere in the programs and are they mandatory?

Thanks for your indulgence.
The default s9y theme has a lot of divs. They are there to make it easier for those partial to css to customise the theme. Unfortunately the downside is that if you are trying to port a template they get in the way. My suggestion when porting a template is to go through the various tpl files and replace the s9y divs with your own template's.

Discard those that are not necessary. When you've done that you'll find that almost everything looks alright. About the only s9y specific styling you'll have to do is for the image-in-posts divs and the calendar related stuff.

Posted: Fri Jan 18, 2008 6:24 am
by Fabien
Thank you for your help. I have choosen to get some external assistance.

Cheers, Fabien