Re: custom view & archetypes

classic Classic list List threaded Threaded
1 message Options
carey carey
Reply | Threaded
Open this post in threaded view

Re: custom view & archetypes

For reference the answer to this was

             <tal:block tal:define="fieldName string:model;
                                    accessor python:here.getField('model').getAccessor(here);">
               <div metal:use-macro="context/widgets/file/macros/file_upload"></div>
               <script type="text/javascript"
                 tal:content="string: document.getElementById('model_file').disabled=false;">

Carey Stevens wrote:

> Hi All,
> I am trying to write a custom edit for my custom archetype. My archetype
> contains a file field.
> For a starter I want to use the default archetypes file widget in my
> custom edit page.
> I have got as far as getting my edit template called on the edit action,
> but am having difficulty getting the file upload widget to show.
>  From the doc I figure it could be something like this, but no luck.
> <tal:block tal:define="file_macro here/widgets/file/macros/file_edit">
>    <span metal:use-macro="file_macro"/>
> following this how then do I get it to upload into the correct field of
> my archetype?
> Any pointers or reference products would be greatly appreciated.
> On another note, I had an _renameAfterCreation method being called when
> the object was first saved using the default archetypes edit, but now
> that I have changed to my custom edit form it seems to nolonger be
> called. Any clues what I need to do get a same form processing behaviour
> the default had?
> Thanks
> Carey
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP.  Click here to play:
> _______________________________________________
> Plone-users mailing list
> [hidden email]

This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more.
Plone-users mailing list
[hidden email]