[ckan-dev] Customising the dataset form in 2.0

Sean Hammond sean.hammond at okfn.org
Mon Feb 4 10:01:05 UTC 2013


> Currently this is by design to keep the snippets clean.  The reason is so
> that snippets can be included in any templates and are passed the required
> data which may be in a different variable in different pages.  If we pass c
> then we will end up with people creating snippets that are not reusable.
> 
> As to the best solution,  I'm not sure.  I think that part of the problem
> here is the depth of the calls template -> snippet -> snippet -> snippet.
> It would be nicer if this was a bit simpler but I understand why it has
> been done this way.  I'd also be happy with something like
> c.snippet_context which would appear as c in snippets but that might be
> even more confusing.

I think there should be an easy way for people to add their own custom
fields to the dataset form, really they should just have to override one
file or block and add in their own code. Maybe we should add a snippet
that's empty by default but that gets passed the necessary values, just
for people using IDatasetForm to override?




More information about the ckan-dev mailing list