Posted on
This allows you to create infinitely deep Silverstripe page hierarchies without having to mess around too much with navigation. Simple and effective.
<% include Nav %> <div id="Content"> <h1>$Title</h1> $Content $Form <% if Children %> <ul style="padding-top: 1em"> <% control Children %> <li><a href=$Link>$MenuTitle </a></li> <% end_control %> </ul> <% end_if %> </div><!--Content-->
Posted on
By default vim opens .ss files with some other file format syntax highlighting.
To enable HTML (actually XHTML) syntax highlighting on your .SS Silverstripe template files, create (or edit) your ~/.vim/filetype.vim file. Then enter this:
au BufNewFile,BufRead *.ss setf xhtml
Then open a .ss file and it’ll give you nice HTML syntax highlighting. And because it’s in your home directory, it’ll keep working even after you upgrade vim.
Posted on
Edit cms/javascript/tinymce.template.js – you can use any configuration options you find at http://wiki.moxiecode.com/index.php/TinyMCE:Configuration
I was trying to use this to enable force_br_newlines but with no luck – although the other settings seem to work okay.
Posted on
I’m pretty obsessive about my HTML validating with no errors and no warnings. It bugs me that when I use Silverstripe’s incredibly convenient $Searchform in the template that it outputs an empty legend tag inside the fieldset.
There’s an easy way to fix this:
Thanks to Maksfeltrin in the Silverstripe forums for pointing this out.
Posted on
I’ve recently started creating sites with SilverStripe CMS, and I’m loving it.
My client wants nicely rendered non-standard font titles that fade in and out, without using javascript.
Here’s how I’m going to accomplish it:
It won’t be a strain on the server as the text title is only generated when the page is saved in the CMS. It’ll still be read by search engines and non-graphics browsers, meaning that it is still accessible. But best of all it will look absolutely beautiful, without requiring a Flash plugin.
I’ve got most of the pieces of this working, I just haven’t glued it together yet. I’m looking forward to it! I’ll let you know how it goes.
Download ImageTitle.php (the ‘library’ I use to interact with GD)