silverstripe

Familiar with SilverStripe? What are your opinions/impressions? [closed]

放肆的年华 提交于 2019-12-03 05:38:31
I'm trying to pick a good CMS that isn't a portal. All of my research as lead me to believe SilverStipe is the best option. I'd like some opinions/impressions. Thanks for any thoughts you have. edit: I've decided to try it out. I'll post my own answer after I've had some time with it. It seems like based on the lack of a response there isn't a large user base. (At least who intersect with the Stack Overflow community.) Our company switched from a custom cms to SilverStripe (SS) last year. Active Record made the migration take much longer than anticipated because of all the building. It also

$Pos from bottom inside <% loop DataObjects %>

为君一笑 提交于 2019-12-02 09:49:49
问题 can one inside a loop in template over a DataObject somehow tell wether you're at $Pos 24 but counted from bottom - something like: <% if Pos = "-24" %>do stuff<% end_if %> or like <% if TotalItems - 24 = Pos %>do stuff<% end_if %> or like <% if Last(24) %>do stuff<% end_if %> 回答1: In Silverstripe 3, to be able to do: <% if FromBottom(24) %> Hello <% end_if %> you'll have to add MyCustomIteratorFunctions.php to your /code folder with the following contents: <?php class

Submit Form in Dataobject - Silverstripe 3.1

限于喜欢 提交于 2019-12-02 09:23:21
问题 I'm using the DataobjectAsPage Module from Aram. Now I want to have a Form on each DOaP site. I created the form like this in my Dataobject public function RegistrationForm() { $fields = new FieldList( new TextField('Name'), new TextField('PlusOne') ); $actions = new FieldList( new FormAction('doRegistration', 'Submit') ); return new Form($this, 'RegistrationForm', $fields, $actions); } public function doRegistration($data, $form) { $submission = new RegistrationObject(); $form->saveInto(

default timezone error in php

*爱你&永不变心* 提交于 2019-12-02 07:11:00
I got the following error/warning while tring to install Kohana/SilverStripe. What does it mean and What do I do for it? Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for '5.5/no DST' instead in C:\Server\apache\htdocs\kohana\system\core\Kohana.php on line 136 Thanks in Advance! This is not an

Submit Form in Dataobject - Silverstripe 3.1

北城余情 提交于 2019-12-02 04:30:36
I'm using the DataobjectAsPage Module from Aram. Now I want to have a Form on each DOaP site. I created the form like this in my Dataobject public function RegistrationForm() { $fields = new FieldList( new TextField('Name'), new TextField('PlusOne') ); $actions = new FieldList( new FormAction('doRegistration', 'Submit') ); return new Form($this, 'RegistrationForm', $fields, $actions); } public function doRegistration($data, $form) { $submission = new RegistrationObject(); $form->saveInto($submission); $submission->EventObjectID = $this->ID; $submission->write(); return $this->redirectBack(); }

$Pos from bottom inside <% loop DataObjects %>

落花浮王杯 提交于 2019-12-02 02:50:23
can one inside a loop in template over a DataObject somehow tell wether you're at $Pos 24 but counted from bottom - something like: <% if Pos = "-24" %>do stuff<% end_if %> or like <% if TotalItems - 24 = Pos %>do stuff<% end_if %> or like <% if Last(24) %>do stuff<% end_if %> In Silverstripe 3, to be able to do: <% if FromBottom(24) %> Hello <% end_if %> you'll have to add MyCustomIteratorFunctions.php to your /code folder with the following contents: <?php class MyCustomIteratorFunctions implements TemplateIteratorProvider { protected $iteratorPos; protected $iteratorTotalItems; public

SilverStripe - Create pagination based on dropdown selection

萝らか妹 提交于 2019-12-02 00:13:14
问题 I am working on building out some pagination for a page on a SilverStripe site that is meant to show all articles at first by default, but the user can select which articles to view by selecting a year from a dropdown control. Here is the template for the articles. Right now I have code in place that adds pagination when the page first loads or is reloaded and all articles are grabbed from the server: <select id="SelectNewsYear"> <option value="">Select a year</option> <% loop

SilverStripe - Create pagination based on dropdown selection

£可爱£侵袭症+ 提交于 2019-12-01 22:24:39
I am working on building out some pagination for a page on a SilverStripe site that is meant to show all articles at first by default, but the user can select which articles to view by selecting a year from a dropdown control. Here is the template for the articles. Right now I have code in place that adds pagination when the page first loads or is reloaded and all articles are grabbed from the server: <select id="SelectNewsYear"> <option value="">Select a year</option> <% loop $GroupedNewsByDate.GroupedBy(PublishYear) %> <option value="$PublishYear">$PublishYear</option> <% end_loop %> <option

SilverStripe - limiting the number of many relations a dataobject can have

落爺英雄遲暮 提交于 2019-12-01 21:51:10
If I have a $has_many relationship that I want to manage with a GridField in the cms, how would I go about putting a limit on the number of how many relations one object can have? Is this possible? Can I do this in the model or would it have to be a check I add into the GridField I'm using to add and remove relations? I'm looking at implementing GridField_SaveHandler to make a custom GridFieldComponent but not sure how I can use this to abort the save if i detect something is wrong. the following 2 solutions are not the cleanest way to solve this, but the most pragmatic and easiest to

Silverstripe admin: “Has one” dropdown converts to ordinary input field after import

回眸只為那壹抹淺笑 提交于 2019-12-01 20:37:19
问题 I am having some problems with the admin of Silverstripe. I defined a database model (see class definitions below), and after I do a dev/build everything is looking as expected. When I try to add a new "package" all the "has one" fields are there with a drop down (see screen shot 1). I also built an importer which imports these packages. When run, everything is looking fine, except when you open a package. Then 'Festival' is correctly coupled. You can see the name, and you can select the drop