Skip to content

Add button not showing for collection #113

@tom-s

Description

@tom-s

Hello,

First, thanks for your amazing bunddle.
I'm having issues with using collections : they get displayed correctly and are editable, but they don't show any "Add" button.

I've got the following RDF mappings

<!-- MyApp.Common.ContentBundle.Entity.ActualitesPage.xml-->
<type
    xmlns:sioc="http://rdfs.org/sioc/ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    typeof="sioc:ActualitesPage"
>
    <children>
        <collection rel="dcterms:hasPart" rev="dcterms:partOf" identifier="sections"/>
    </children>
</type>

<!-- MyApp.Common.ContentBundle.Entity.ActualitesPage.xml-->
<type
    xmlns:sioc="http://rdfs.org/sioc/ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    typeof="sioc:ActualitesPageSection"
>
    <children>
        <collection rel="dcterms:hasPart" rev="dcterms:partOf" identifier="sections"/>
    </children>
</type>

<!-- MyApp.Common.ContentBundle.Entity.ActualitesPageSection.xml-->
<type
    xmlns:sioc="http://rdfs.org/sioc/ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    typeof="sioc:ActualitesPageSection"
>
    <rev>dcterms:partOf</rev>
    <children>
        <property property="dcterms:title" identifier="title"/>
        <collection rel="dcterms:hasPart" rev="dcterms:partOf" identifier="sectionLines"/>
    </children>
</type>

<!-- MyApp.Common.ContentBundle.Entity.ActualitesPageSectionLine.xml-->
<type
    xmlns:sioc="http://rdfs.org/sioc/ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    typeof="sioc:ActualitesPageSectionLine"
>
    <rev>dcterms:partOf</rev>
    <children>
        <property property="dcterms:contentLeft" identifier="contentLeft"/>
        <property property="dcterms:contentRight" identifier="contentRight"/>
    </children>
</type>

which I'm displaying with the following template :

{% for section in sections %}
        {% createphp section as="rdf" noautotag %}
        <section class="actualites content" {{ createphp_attributes(rdf) }}>
            <h1 {{ createphp_attributes( rdf.title ) }}>{{ createphp_content( rdf.title ) }}</h1>
            {% for line in section.getSectionLines() %}
                {% createphp line as="linerdf" noautotag %}
                 <ul class="floated-list clearfix" {{ createphp_attributes(linerdf) }}>
                    <li class="actualite-image">
                        <div {{ createphp_attributes( linerdf.contentLeft ) }}>{{ createphp_content( linerdf.contentLeft ) }}</div>
                    </li>
                    <li class="actualite-text">
                        <div {{ createphp_attributes( linerdf.contentRight ) }}>{{ createphp_content( linerdf.contentRight ) }}</div>
                    </li>
                </ul>
                {% endcreatephp %}
            {% endfor %}
        </section>
        {% endcreatephp %}
    {% endfor %}

It seems my collections are not recognized as such, (no rev rel tag in the html), am I doing something wrong ?

Many thanks,

Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions