Exemple #1
0
from Products.Archetypes import atapi
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata

from my315ok.MediaPage import MediaPageMessageFactory as _
from my315ok.MediaPage.interfaces import Imediapage
from my315ok.MediaPage.config import PROJECTNAME

mediapageSchema = folder.ATFolderSchema.copy() + atapi.Schema(
    (
        # -*- Your Archetypes field definitions here ... -*-
        atapi.StringField(
            "displaymodel",
            storage=atapi.AnnotationStorage(),
            widget=atapi.SelectionWidget(
                label=_(u"Display Model"), description=_(u"select a layou for this media page"), format="select"
            ),
            required=True,
            default="right",
            vocabulary=(
                ("right", _(u"image float right")),
                ("left", _(u"image float left")),
                ("banner", _(u"image matrix")),
            ),
        ),
        atapi.TextField(
            "text",
            searchable=True,
            storage=atapi.AnnotationStorage(),
            widget=atapi.RichWidget(
                label=_(u"body"), description=_(u"a rich textbox that will be a description of the mediapage")
Exemple #2
0
from my315ok.MediaPage import MediaPageMessageFactory as _

from my315ok.MediaPage.interfaces import Irich_image
from my315ok.MediaPage.config import PROJECTNAME

rich_imageSchema = ATImageSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

    atapi.TextField(
        'comment',
        storage=atapi.AnnotationStorage(),
        default_output_type='text/html',
        searchable=True,
        widget=atapi.RichWidget(
            label=_(u"comment details"),
            description=_(u""),
        ),
    ),


    atapi.StringField(
        'link2url',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"link to url"),
            description=_(u""),
        ),
    ),