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-673ed53b2c3cf934571533/]  

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-673ed53b2c8a2195586290/] 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-673ed53b2c9d4452392422/] Or when you adding a field to a tab: [crayon-673ed53b2c9d9698178403/]  

Continue Reading

Sliding Sidebar