Skip to content

Configuration option defaults.snippet.filter #174

Closed
wants to merge 2 commits into from

1 participant

@SamWhited
Radiant CMS dev team member

What I've Done

I have added a configuration option to Radiant::Config called 'defaults.snippet.filter' to match the existing 'defaults.page.filter'.

As the title suggests, this option would allow a site administrator, extension developer, etc. to set the default filter for all snippets to something other than "None."

How to use it

In config/environment.rb or in an extension one might write:

Radiant::Config['defaults.snippet.filter'] = 'Markdown' if Radiant::Config.table_exists?

@SamWhited
Radiant CMS dev team member

I'm also working on fixing the spec to include this, but I can't test it on my current dev setup (rvm madness).

@SamWhited SamWhited Updated the snippet's spec to check that the filter will follow the d…
…efault

filter and to make sure the default filter will not overwrite filters which have
been manually set
9220755
@SamWhited
Radiant CMS dev team member

And now I've done it. I think that should work, but the second commit is w/o proper testing.

@SamWhited
Radiant CMS dev team member

Rebased into one commit and merged.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.