[Plone-IT] creare pagina con contenuto

Vito Falco vitofalco a gmail.com
Ven 16 Gen 2009 09:16:27 UTC


Ecco il codice di cui parlavo:

# Special handling of the front-page, as we want to translate it
>         if 'front-page' in existing:
>             fp = p['front-page']
>             if wftool.getInfoFor(fp, 'review_state') != 'published':
>                 wftool.doActionFor(fp, 'publish')
>
>             # Show off presentation mode
>             fp.setPresentation(True)
>
>             # Mark as fully created
>             fp.unmarkCreationFlag()
>
>             if target_language is not None:
>                 util = queryUtility(ITranslationDomain, 'plonefrontpage')
>                 if util is not None:
>                     front_title = util.translate(u'front-title',
>                                        target_language=target_language,
>                                        default="Welcome to Plone")
>                     front_desc = util.translate(u'front-description',
>                                        target_language=target_language,
>                                        default="Congratulations! You have
> successfully installed Plone.")
>                     front_text = util.translate(u'front-text',
>                                        target_language=target_language)
>                     fp.setLanguage(language)
>                     fp.setTitle(front_title)
>                     fp.setDescription(front_desc)
>                     if front_text != u'front-text':
>                         fp.setText(front_text)
>

2009/1/16 Vito Falco <vitofalco a gmail.com>

> Ciao,
> dai un'occhiata al codice che PLone utilizza in fase di installazione per
> creare la "front-page" nella root del plone site ;-)
>
> Vito
>
> Il giorno 16 gennaio 2009 10.04, Yuri <yurj a alfa.it> ha scritto:
>
>> Salve,
>>
>> avrei necessità di creare un tipo pagina che abbia già un contenuto
>> precaricato. Qual è il modo più semplice per farlo, senza scrivere troppo
>> codice? :)
>>
>>
>> _______________________________________________
>> Plone-IT mailing list
>> Plone-IT a lists.plone.org
>> http://lists.plone.org/mailman/listinfo/plone-it
>> http://www.nabble.com/Plone---Italy-f21728.html
>>
>
>
>
> --
> "Design is the method of putting form and content together. Design, just as
> art, has multiple definitions; there is no single definition. Design can be
> art. Design can be aesthetics. Design is so simple, that's why it is so
> complicated." by Paul Rand
>



-- 
"Design is the method of putting form and content together. Design, just as
art, has multiple definitions; there is no single definition. Design can be
art. Design can be aesthetics. Design is so simple, that's why it is so
complicated." by Paul Rand
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.plone.org/pipermail/plone-plone-it/attachments/20090116/eba63de8/attachment.html>


Maggiori informazioni sulla lista Plone-IT