Silva 2.2 - Creating Content Types Issues
Jonathan Bowlas <j.bowlas-hclig2XLE9Zaa/[email protected]> Wed, 4 Aug 2010 10:22:41 +0100
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
I'm following the documentation at docs.infrae.com in order to rebuild
all of our UCL Silva products however I have a couple of issues I'd
really appreciate some help with:
I'm currently converting our Silva UCL Attribute product to use grok
views, but whilst I can get my Silva UCL Attribute to preview in the
SMI perfectly using the Grok view i've defined on the PublicView
Class, the public view of this object returns a 404 error. I think it
might be because the Silva UCL Attribute subclasses the Asset base
class which doesn't have a public view - but I'm not sure, some
clarification would be helpful.
Furthermore I want to be able to prevent multiple instances of the
Silva UCL Attribute object being placed into containers, so I thought
the best approach would be to find a way to make the "id" field in the
add form default (e.g. to "uclattributes") and make it non-editable. I
decided to override the default Id field that gets added as stated
here http://docs.infrae.com/silva/contents/forms.html#add-forms using
my own formlib schema thus:
id =3D silvaschema.ID(
title=3Du"id",
description=3Du"No spaces or special characters besides =91_=92 or
=91-=92 or =91.=92",
default=3Du"uclattributes",
readonly=3DTrue,
required=3DTrue)
Unfortunately this has two issues:
1) The add form doesn't seem to recognise that I've given the id field
a readonly parameter (it does in the edit view).
2) Also this id field displays by default in the edit view - when it
should be hidden.
Help would be appreciated.
Regards
-- =
Jonathan Bowlas
Web Support Officer
Media Services
University College London
Email: j.bowlas-hclig2XLE9Zaa/[email protected]