Does anyone know if there is an option to set the default filter for
snippets in Radiant 0.9.0?
I’ve got my default pages filter set (‘defaults.page.filter’) so I
thought there might be a similar option for snippets
(‘defaults.snippets.filter’ or similar) but nothing I’ve tried has
worked, and I can find no information about it online.
Georgia Institute of Technology
Mechanical Engineering Undergraduate [email protected]
404.492.6008
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
Does anyone know if there is an option to set the default filter for
snippets in Radiant 0.9.0?
I’ve got my default pages filter set (‘defaults.page.filter’) so I
thought there might be a similar option for snippets
(‘defaults.snippets.filter’ or similar) but nothing I’ve tried has
worked, and I can find no information about it online.
If you want a quick solution, you can override the view for creating
snippets with an extension.
Radiant does not currently set a default filter for Snippets.
There are some details on the wiki about configuration
In 0.9.0 look at
That’s where it uses the Radiant::Config settings for the default page
part filter.
Snippets aren’t as complex as pages, though. This could be addressed
in the model with after_initialize or in the controller.
How about something like this?
It appears to be working for me and is not causing any problems (it
shouldn’t, it’s a grand total of 3 lines of code). It simply adds the
‘defaults.snippet.filter’ option which works exactly the same as
‘defaults.page.filter’.
I’ll forward this over to radiant-dev once I get a bit of feedback (I’ve
never submitted a patch for Radiant before, so I’d like to read up on
all policies and procedures first and make sure I do the thing properly,
even for a patch as simple as this one).
I’ll forward this over to radiant-dev once I get a bit of feedback (I’ve
never submitted a patch for Radiant before, so I’d like to read up on
all policies and procedures first and make sure I do the thing properly,
even for a patch as simple as this one).
Best,
Sam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/