123 Posts in 58 Topics by 51 members
Showcase Questions
SilverStripe Forums » Showcase Questions » How to make 2 column page?
Feedback and questions about sites in the Community Showcase.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 2382 Views |
-
How to make 2 column page?

3 October 2009 at 8:35pm
I am new to use SilverStripe. I want to make 2 column layout of a page. Help me to make it.
-
Re: How to make 2 column page?

3 October 2009 at 8:52pm Last edited: 4 October 2009 12:46am
Sure! Do you want some coffee too?
-
Re: How to make 2 column page?

8 December 2009 at 9:15am Last edited: 8 December 2009 9:17am
Hi,
Did you ever get an answer to your question? You might get a better response if you were more specific about what you need help with as well as posted it in more relevant forum section (e.g., "Template Questions".)Have you completed the tutorials at http://doc.silverstripe.org/doku.php?id=tutorials? That will get you pointed in the right direction.
If you wanted to make an editable sidebar with an image and content, you could do something like the following in your Page.php.
<?php
class Page extends SiteTree {
static $db = array(
'SidebarImageCaption' => 'Varchar(50)',
'SidebarContent' => 'HTMLText',
);static $has_one = array(
'SidebarImage' => 'Image');function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Sidebar", new ImageField("SidebarImage", "Image"));
$fields->addFieldToTab("Root.Content.Sidebar", new TextField("SidebarImageCaption", "Caption"));
$fields->addFieldToTab("Root.Content.Sidebar", new HtmlEditorField("SidebarContent", "Content"));
return $fields;
}
}class Page_Controller extends ContentController {
....}
?>This will create a "Sidebar" tab in the CMS admin that you can add an image and text to.
Hope this gets you started,
Sam
| 2382 Views | ||
|
Page:
1
|
Go to Top |


funny
