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.

Archive /

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

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

Questions on editing


Reply


3 Posts   1084 Views

Avatar
kf

Community Member, 3 Posts

9 August 2008 at 12:39pm

Edited: 09/08/2008 12:40pm

Hi,

I've been using Silverstripe a bit, and it looks nice. However, while updating a Silverstripe website, I came across some issues for which I have a couple of questions and comments:

1. How do I format my content without using tables? Say I want to use div and span tags and css to format the content, I don't see a way to do this without editing the raw html. Maybe that's just how it works? Or is there a trick with a .ss page, for example? This is not data from a database, by the way, just manually typed in content.

2. When using tables, I had real trouble formatting the table itself. For example, the border wouldn't go away. I set border="0" and there was a border anyway. I solved this by setting the cell border color to the same as the background color, but that took me a while to figure out. I tried to set cellspacing and cellpadding, but nothing happened. I am using the default blackcandy theme (slightly modded to change colors).

3. When using tables, I also had trouble formatting the content of the table. For example, I had some cells with a picture and some text (a link). Trying to center adjust the text under the image was difficult - it worked in one cell, but not in another. Finally I edited the html and copied the formatting from one cell to the other, and now it's fine.

Thanks.

Avatar
Blackdog

Community Member, 156 Posts

9 August 2008 at 2:39pm

The trick is to look at your SS template files.

Have you gone through the tutorials?

They will be a great help for you as the contain very useful information on getting started with SS.

Avatar
sethstacey

Community Member, 7 Posts

16 August 2008 at 8:28am

Aye, the tutorials are a great place to start. I'm a bit of a n00b to silverstripe, myself, and I found them very helpful.

One thing to note, however, is that if you installed silverstripe with the Blackcandy theme, you'll need to use a different directory than the tutorials tell you to (i.e. If it says go to tutorials-->code you will really need to go to mysite-->code). It took me several hours to figure this out. =)

I have yet to even try tables in Silverstripe. I always use devs and CSS to do stuff. Usually, for me, the devs go into the page.ss file (or whatever other template I am useing i.e. HomePage.ss) so that when I enter stuff into the admin editor, it goes to the right place. If you look in templates-->Layout, you will see another page.ss file. This corresponds to the $layout in the first page.ss. Inside $layout is the call for whatever you enter into the admin interface ($content if I'm guessing, but not positive).

So, basically, if you wrap $layout with the main divs you want, then you can give a div over EVERYTHING you enter into your admin area. If you need divs over specific elements inside what you enter into the admin, I think you'll need to use the html editor.

If you have any problems be sure to post.

Seth