Brilliant. That worked perfectly. I really appreciate your quick response - SilverStripe just keeps getting better!
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.
- Previous 10 entries
- 1
- 2
- Page 33(current)
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.
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).
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... :)
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.
- Previous 10 entries
- 1
- 2
- Page 33(current)