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.

Customising the CMS /

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

Multi Column layouts


Go to End


21 Posts   11397 Views

Avatar
robskinn

Community Member, 12 Posts

2 November 2014 at 4:56am

Brilliant. That worked perfectly. I really appreciate your quick response - SilverStripe just keeps getting better!

Avatar
DowntownScience

Community Member, 13 Posts

28 February 2015 at 9:33am

I'm a noob. Read over this thread several times. Ultimately followed the examples in RobSkinn's second to last post.

Code is in /mysite/code/page.php

Updated templates/Layout/page.ss with

<div class="content">$Content</div>
</article>
$Form
$PageComments

$ColumnOne
$ColumnTwo
</div>

I've run /dev/build and ?flush=1. I can see then tabs in CMS. No errors when accessing the tabs. No errors when entering data in the new tabs and saving.

So I went in and entered something into Main Content, Column One, and Column Two so that I could see how it was laid out.

When I preview the page I can only see the Main Content. I noticed that whatever I put into Column One/Two saves, then disappears from CMS.

Questions:

1. Did I update the correct files? I'm never sure which page.ss I'm supposed to be updating. The one in the templates root or in the layout root.
2. Are there any other files I should be creating?

Thanks in advance.

Avatar
acoggins

Community Member, 19 Posts

28 February 2015 at 8:06pm

Edited: 28/02/2015 8:12pm

Hi,

I would suggest you work through the new screencasts on this page: http://doc.silverstripe.org/en/tutorials/

They are just excellent and have made things a whole lot clearer for me. If you already have some experience with SS you could come in at lesson 5 maybe. Lesson 6 covers adding custom fields and then they go on to more complex relationships like has_,many and many_many.

I can't recommend them enough. I've now started doing some very useful stuff based on concepts I learned on these tutorials (and I'm also very much a noob).

Avatar
martimiz

Forum Moderator, 1391 Posts

28 February 2015 at 11:25pm

If, after dev/build?flush=1, the contents in column one and two don't save, it might very well be because the database fieldnames you used in $db are somehow not exactly the same as the ones you use in getCMSFields to create the inputfields in the CMS - supposing of course that they're there in $db... :)

Avatar
DowntownScience

Community Member, 13 Posts

4 March 2015 at 11:20am

Thanks for the help guys. I ended up finding the error which was just a boneheaded move on my part. Didn't end up being what I thought it would be after all. Now looking into page blocks.

Go to Top