Making Silverstripe Editor – TinyMCE Smaller

Silverstripe uses TinyMCE for its HTMLEditorField. By default, the editor is rendered relatively tall. But how do we change the height to make it smaller without having to alter Silverstripe core file? Silverstripe provides setRows() function to modify HTMLEditorField height. So you can make it smaller or bigger (if you think the default is not big enough). As usual, you can chain the function after ::create() like below: [crayon-676e956430fda282556119/]  

Modifying Silverstripe 3 Member Lock Out

By default, Silverstripe gives 10 attempts for user to sign in. The easiest way to modify the lock out delay and number of attempt in Silverstripe 3 is through config.yml Go to mysite/_config/config.yml and add the following code: [crayon-676e956431552981904736/] And voila, your silverstripe lock out system is updated without the need to update the Silverstripe’s core. If you ever need to access Member’s attribute regarding to lock out, you can use the following: (assuming $member is an instance of Member class) $member->LockedOutUntil

Continue Reading

Adding Description in Silverstripe CMS Fields

When building forms, there are times when we want to display helpful information regarding the field. There are a couple of ways to do this: by using LiteralField or using setDescription() in the field object. Silverstripe provides setDescription() function in a field object to help generating text underneath a field. This field can be chained with other function. So you can set the description on creation like below: [crayon-676e9564316f4051161929/] Or when you adding a field to a tab: [crayon-676e9564316fa835542817/]  

Continue Reading

Sliding Sidebar