Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » Questions on editing

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

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

Page: 1
Go to End
Author Topic: 1051 Views
  • kf
    Community Member
    3 Posts

    Questions on editing Link to this post


    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.


  • Blackdog
    Community Member
    156 Posts

    Re: Questions on editing Link to this post

    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.

  • sethstacey
    Community Member
    7 Posts

    Re: Questions on editing Link to this post

    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.


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.