Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

migrating a css site to silverstripe


Go to End


11 Posts   3601 Views

Avatar
skt

Community Member, 7 Posts

13 August 2008 at 2:27pm

Hello,
I'm attempting to migrate an existing website into SilverStripe by creating a new theme. Since the stylesheet is already written, I'm attempting to simply use my main CSS file as the "layout.css" of the new theme. I have also added blank "typography.css" and "form.css" files to the theme's css directory so that the font declarations and form styles in my original stylesheet are respected.

I have read in the documentation that it's best to use the "typography" div so that the admin interface is not affected by the theme. I have not done so (I'm trying to avoid non-semantic elements, and I'd prefer not to change the site's structure).

I don't see any changes in the admin panel as a result of this approach; the login page, however, is affected. Is there any way to have the login page simply use the default theme instead? If so, I would love some detailed info on this (I am totally new to CMSs).

Many thanks,
ST

Avatar
Willr

Forum Moderator, 5523 Posts

13 August 2008 at 9:38pm

No your themes style will override the login styles. You can just style your own login styles in your form.css file using #MemberLoginForm_LoginForm input { }, #MemberLoginForm_LoginForm label { // label styles.. etc etc

Avatar
skt

Community Member, 7 Posts

14 August 2008 at 12:30am

Oh good -- I was hoping I could solve it that way. Thank you.

Avatar
skt

Community Member, 7 Posts

14 August 2008 at 7:04am

Another issue: I'm trying to create a new page type (following tutorial #2), and nothing I do seems to have any effect whatsoever on the admin interface (yes, I've done the */db/build?flush=1 and */admin?flush=1). I've tried cutting and pasting the code directly from the tutorial -- still nothing.

There must be something major I am missing. Any ideas?

A side note: As a CMS noob, I must admit my experience has been frustrating so far. Perhaps this is the case with all CMS systems -- I've got nothing to compare to. Here's what I'm running into so far:
* The website I'm migrating was already fully tested and debugged in all major browsers. But in SS, even with a basic page layout, I see there are layout issues appearing in IE6 which I'll have to re-debug.
* The documentation is not thorough enough for a developer at my level.

Many thanks, I appreciate your help.
ST

Avatar
Willr

Forum Moderator, 5523 Posts

14 August 2008 at 9:25am

Make sure SS is sending the same doc type as your original (It may be rewriting it to html ) so check the source on the front end and make sure it match

Avatar
skt

Community Member, 7 Posts

14 August 2008 at 9:47am

Yes, the Doctype is exactly the same.

Any thoughts on why my attempts to follow Tutorial #2 haven't worked? I've copied the bits of code. First tried making changes to the original Page.php in the tutorial/code directory; that didn't work, so I replaced the original Page.php and created a new php file to extend it as in the example. Still no effect.

Avatar
Willr

Forum Moderator, 5523 Posts

14 August 2008 at 9:52am

Did you install with the tutorial option or the black candy option for the default theme?.

Post your files here. For SS to pick them up make sure that the filename eg ArticlePage.php matchs the class name inside it - ArticlePage extends Page {}

Avatar
skt

Community Member, 7 Posts

14 August 2008 at 1:10pm

I believe I installed with blackcandy as the default theme... if I had not, would that theme still appear in my themes directory?

Thank you.
ST

Go to Top