0

In Sulu cmf demo there is a sctionb where i can add multiple blocks. I'd like to use this as "Pagebuilder".

I thought this block in my pages/default.xml will do the trick (and I think it is). Do I need to clear any cache for this to work, or what am I missing?

    <section name="content">
        <meta>
            <title lang="de">Inhalt</title>
            <title lang="en">Content</title>

            <info_text lang="de">Bereich für den Inhalt</info_text>
            <info_text lang="en">Content Section</info_text>
        </meta>
        <properties>
            <property name="article" type="text_editor" mandatory="true">
                <meta>
                    <title lang="de">Artikel</title>
                    <title lang="en">Article</title>
                </meta>
            </property>

            <block name="block"
                   default-type="editor"
                   minOccurs="2"
                   maxOccurs="10"
                   mandatory="true">
                <meta>
                    <title lang="de">Block</title>
                    <title lang="en">Block</title>
                </meta>
                <types>
                    <type name="editor">
                        <meta>
                            <title lang="de">Texteditor</title>
                            <title lang="en">Text editor</title>
                        </meta>
                        <properties>
                            <property name="title" type="text_line" mandatory="true">
                                <meta>
                                    <title lang="de">Titel</title>
                                    <title lang="en">Title</title>
                                </meta>

                                <tag name="sulu.content.sortmode.show"/>
                            </property>
                            <property name="article" type="text_editor" mandatory="true">
                                <meta>
                                    <title lang="de">Artikel</title>
                                    <title lang="en">Article</title>
                                </meta>
                            </property>
                        </properties>
                    </type>
                    <type name="textarea">
                        <meta>
                            <title lang="de">Texteingabe</title>
                            <title lang="en">Text area</title>
                        </meta>
                        <properties>
                            <property name="title" type="text_line" mandatory="true">
                                <meta>
                                    <title lang="de">Titel</title>
                                    <title lang="en">Title</title>
                                </meta>

                                <tag name="sulu.content.sortmode.show"/>
                            </property>
                            <property name="article" type="text_area" mandatory="true">
                                <meta>
                                    <title lang="de">Artikel</title>
                                    <title lang="en">Article</title>
                                </meta>
                            </property>
                        </properties>
                    </type>
                    <type name="title_only">
                        <meta>
                            <title lang="de">Nur Titel</title>
                            <title lang="en">Title Only</title>
                        </meta>
                        <properties>
                            <property name="title" type="text_line" mandatory="true">
                                <meta>
                                    <title lang="de">Titel</title>
                                    <title lang="en">Title</title>
                                </meta>

                                <tag name="sulu.content.sortmode.show"/>
                            </property>
                        </properties>
                    </type>
                </types>
            </block>

            <property name="name" type="text_line" mandatory="false" minOccurs="2" maxOccurs="5">
                <meta>
                    <title lang="de">Name</title>
                    <title lang="en">Name</title>
                </meta>
            </property>
        </properties>
    </section>

    <property name="links" type="internal_links">
        <meta>
            <title lang="de">Verknüpfungen</title>
            <title lang="en">Internal links</title>
        </meta>
    </property>

</properties>
Patrick
  • 1,562
  • 1
  • 16
  • 33

2 Answers2

0

Okay, after i logged off and signed in again, it works like expected.

Patrick
  • 1,562
  • 1
  • 16
  • 33
  • Was this enough, or did you also have to clear the cache? Because clearing the cache should not be necessary (at least not in dev mode). And if this helped, you should mark this question as accepted :-) – Daniel Rotter Sep 21 '15 at 13:11
  • Yeah, i just logged in and of. Thiswhile i wanted to ask why clearing should be necesarry. Marked the answer as correct now :-) – Patrick Sep 24 '15 at 13:59
0

If you do changes in a template file you need to clear the cache with the default symfony command:

app/console cache:clear

EDIT

Did test it Daniel Rotter is right on dev you don't need to clear the cache. Just refresh the page and it should show your changes.

Alexander Schranz
  • 2,154
  • 2
  • 25
  • 42
  • are the poperties handled like templates? – Patrick Sep 21 '15 at 12:25
  • a property is based on a content type documentation can be found here http://docs.sulu.io/en/latest/reference/content-types/index.html. if you want to create your own have a look at the source code of a similiar content type. – Alexander Schranz Sep 21 '15 at 13:26