|
List Info
Thread: modifying content types by editing the python script
|
|
| modifying content types by editing the
python script |
  Belgium |
2007-03-20 07:25:01 |
Hi,
I need to have some extra fields in the general document
(page) template.
So I've added the new and extra fields by modifying the
python script
document.py that you can find in the folder
AtContentTypes/content. When I
edit a general document or page the new fields are shown.
But in the view
mode the fields aren't visible. So the question is how and
where can I
modify the view_template so that the fields are also visible
in the view
mode.
Thnx!
Kenneth
(D020055 on the IRC-channel)
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: modifying content types by editing
the python script |
  Netherlands |
2007-03-20 07:33:11 |
Previously kenneth system-solutions.be wrote:
> Hi,
>
> I need to have some extra fields in the general
document (page) template.
> So I've added the new and extra fields by modifying the
python script
> document.py that you can find in the folder
AtContentTypes/content.
Don't do that: changing standard products will make future
upgrades very
problematic and make it very hard to seperate your changes
from standard
features, making maintenance a lot harder for you and almost
impossible
for others.
Instead create product with your new type derived from the
standard one
and use that to replace the standard portal type. There are
examples for
doing that in the documentation area on plone.org
> When I edit a general document or page the new fields
are shown. But
> in the view mode the fields aren't visible. So the
question is how and
> where can I modify the view_template so that the fields
are also
> visible in the view mode.
You have to modify the view template, see the templates in
Products/ATContentTypes/skins/ATContentTypes/ . You will
need to copy
the standard template for your new type to your new product,
rename it
and modify it.
Wichert.
--
Wichert Akkerman <wichert wiggy.net> It is
simple to make things.
http://www.wiggy.net/
It is hard to make things simple.
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: modifying content types by editing
the python script |
  Belgium |
2007-03-20 08:10:09 |
On 20 Mar 2007, at 13:33, Wichert Akkerman wrote:
> Previously kenneth system-solutions.be wrote:
>> Hi,
>>
>> I need to have some extra fields in the general
document (page)
>> template.
>> So I've added the new and extra fields by modifying
the python script
>> document.py that you can find in the folder
AtContentTypes/content.
>
> Don't do that: changing standard products will make
future upgrades
> very
> problematic and make it very hard to seperate your
changes from
> standard
> features, making maintenance a lot harder for you and
almost
> impossible
> for others.
>
> Instead create product with your new type derived from
the standard
> one
> and use that to replace the standard portal type. There
are
> examples for
> doing that in the documentation area on plone.org
I strongly second wichert in that regard: modifying original
code
will make your future work a nightmare.
Imagine that someone else has to maintain your site at some
times,
and decides to upgrade core products…
The RichDocument tutorial is very good at teaching how to
create a
new type derived from a standard one.
Its chapter about migrations tells how to make existing
objects in
your portal become the new type you created.
>
>> [...]
>
> Wichert.
--
David
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: modifying content types by editing
the pythonscript |
  Belgium |
2007-03-20 08:59:34 |
Hi,
I understand the fact that it isn't a good idea to change
the source code
of content types because it gives you a lot of problems with
maintaining
and updating the website.
However I was wondering if this isn't a disadvantage of
Plone. If you
consider that a website is changing, evolving every day...
For example : today I create a website in Plone with the
standaard content
types. After a few weeks, months or years I decide that an
image content
type should have an extra field with some extra info.
Perhaps some info
about the autor or some extra explanation for the image. So
in Plone it's
impossible to realise this because you need to create a new
content type.
So all the old images can't have the extra field? And If you
create a new
content type for images and you remove the old one (the
orginal one) you
will loose all the images that are currently on the
website.
I would like to know your thoughts, remarks about this.
Best regards
Kenneth
>
> On 20 Mar 2007, at 13:33, Wichert Akkerman wrote:
>
>> Previously kenneth wrote:
>>> Hi,
>>>
>>> I need to have some extra fields in the general
document (page)
>>> template.
>>> So I've added the new and extra fields by
modifying the python script
>>> document.py that you can find in the folder
AtContentTypes/content.
>>
>> Don't do that: changing standard products will make
future upgrades
>> very
>> problematic and make it very hard to seperate your
changes from
>> standard
>> features, making maintenance a lot harder for you
and almost
>> impossible
>> for others.
>>
>> Instead create product with your new type derived
from the standard
>> one
>> and use that to replace the standard portal type.
There are
>> examples for
>> doing that in the documentation area on plone.org
>
> I strongly second wichert in that regard: modifying
original code
> will make your future work a nightmare.
> Imagine that someone else has to maintain your site at
some times,
> and decides to upgrade core products…
>
> The RichDocument tutorial is very good at teaching how
to create a
> new type derived from a standard one.
> Its chapter about migrations tells how to make existing
objects in
> your portal become the new type you created.
>>
>>> [...]
>>
>> Wichert.
>
> --
> David
>
------------------------------------------------------------
-------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share
> your
> opinions on IT & business topics through brief
surveys-and earn cash
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Plone-Users mailing list
> Plone-Users lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plone-users
>
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: modifying content types by editing
the pythonscript |
  Italy |
2007-03-20 09:12:05 |
kenneth system-solutions.be wrote:
> Hi,
>
> I understand the fact that it isn't a good idea to
change the source code
> of content types because it gives you a lot of problems
with maintaining
> and updating the website.
> However I was wondering if this isn't a disadvantage of
Plone. If you
> consider that a website is changing, evolving every
day...
> For example : today I create a website in Plone with
the standaard content
> types. After a few weeks, months or years I decide that
an image content
> type should have an extra field with some extra info.
Perhaps some info
> about the autor or some extra explanation for the
image. So in Plone it's
> impossible to realise this because you need to create a
new content type.
> So all the old images can't have the extra field?
Just change the type of old images in the new type.
Look in Archetype where is stored the Portal Type, then
change it from
old_type (Es: image) in new_type. All the new fields should
show up
magically, I think.
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
| Re: modifying content types by editing
the pythonscript |
  Belgium |
2007-03-20 10:26:00 |
On 20 Mar 2007, at 14:59, kenneth system-solutions.be wrote:
> Hi,
>
> I understand the fact that it isn't a good idea to
change the
> source code
> of content types because it gives you a lot of problems
with
> maintaining
> and updating the website.
> However I was wondering if this isn't a disadvantage of
Plone. If you
> consider that a website is changing, evolving every
day...
> For example : today I create a website in Plone with
the standaard
> content
> types. After a few weeks, months or years I decide that
an image
> content
> type should have an extra field with some extra info.
Perhaps some
> info
> about the autor or some extra explanation for the
image. So in
> Plone it's
> impossible to realise this because you need to create a
new content
> type.
> So all the old images can't have the extra field? And
If you create
> a new
> content type for images and you remove the old one (the
orginal
> one) you
> will loose all the images that are currently on the
website.
> I would like to know your thoughts, remarks about
this.
In my previous mail, I pointed you to the RichDocument
tutorial and
specifically to its migration chapter that adresses that
issue.
Cheers,
David
>
> Best regards
>
> Kenneth
>>
>> On 20 Mar 2007, at 13:33, Wichert Akkerman wrote:
>>
>>> Previously kenneth wrote:
>>>> Hi,
>>>>
>>>> I need to have some extra fields in the
general document (page)
>>>> template.
>>>> So I've added the new and extra fields by
modifying the python
>>>> script
>>>> document.py that you can find in the folder
AtContentTypes/content.
>>>
>>> Don't do that: changing standard products will
make future upgrades
>>> very
>>> problematic and make it very hard to seperate
your changes from
>>> standard
>>> features, making maintenance a lot harder for
you and almost
>>> impossible
>>> for others.
>>>
>>> Instead create product with your new type
derived from the standard
>>> one
>>> and use that to replace the standard portal
type. There are
>>> examples for
>>> doing that in the documentation area on
plone.org
>>
>> I strongly second wichert in that regard: modifying
original code
>> will make your future work a nightmare.
>> Imagine that someone else has to maintain your site
at some times,
>> and decides to upgrade core products…
>>
>> The RichDocument tutorial is very good at teaching
how to create a
>> new type derived from a standard one.
>> Its chapter about migrations tells how to make
existing objects in
>> your portal become the new type you created.
>>>
>>>> [...]
>>>
>>> Wichert.
>>
>> --
>> David
>>
------------------------------------------------------------
---------
>> ----
>> Take Surveys. Earn Cash. Influence the Future of
IT
>> Join SourceForge.net's Techsay panel and you'll get
the chance to
>> share
>> your
>> opinions on IT & business topics through brief
surveys-and earn cash
>> http://www.techsa
y.com/default.php?
>> page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Plone-Users mailing list
>> Plone-Users lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/plone-users
>>
>
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plone-Users mailing list
Plone-Users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
|
|
[1-6]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|