Skip to content

Polish up parameters and add cookie option

Compare
Choose a tag to compare
@programcsharp programcsharp released this 16 Sep 03:40
· 242 commits to master since this release

POTENTIAL BREAKING

Theoretically this should still "work", however, the following is needed for full functionality with permalink and cookies:

GlobalFilters.Filters.Add(new GriddlyParameterAttribute());

ValueProviderFactories.Factories.Add(new GriddlyCookieFilterValueProviderFactory());

If you don't want cookies, don't add the GriddlyCookieFilterValueProviderFactory.

The GriddlyParameterAttribute is still needed to make parameters work correctly. If the attribute isn't there, permalinks and defaults won't work right.

FEATURES:

  • Defaults and Parameters are split vs. combined so that permalinks and cookies can set the current values but the original defaults be retained so a user can reset back
  • Permalinks work, so a /index?foo=bar will properly be passed through to indexgrid. For a page with multiple, it will set the values on all of 'em
  • Default argument values now work correctly for defaults and can be used instead of SetGriddlyDefault for primitives
  • Session cookies are set on each render with the current filter. If using the GriddlyCookieFilterValueProviderFactory, this will set the parameters from that.
  • Option to turn off history support