Property not rendered in multicolumn


(Daniel Bischoff) #1

I made a headernode , that works perfectly fine as single node, but using it in a multicolumn doesn’t render the headline (placeholder/content)

Here is my Headerfusion:

prototype(hkm.schulcloud:MultiLineHeader) < prototype(Neos.Neos:ContentComponent) {
    // templatePath = 'resource://hkm.schulcloud/Private/Templates/FusionObjects/MultiLineHeader.html'

    headline = Neos.Neos:Editable {
	    property = 'headline'
    }   

	backgroundimage = Neos.Neos:ImageUri {
			asset = ${q(node).property('image')}
	}
	classes = Neos.Fusion:RawArray {
		layout = ${q(node).property('layout')}
		hasBG = ${q(node).property('image') ? 'hasBackgroundimage' : false}
	}
	id = ${q(node).property('id')}
	headline.@process.debug = Neos.Fusion:Debug {
		title = 'Debug of headline'
	}

    renderer = afx`
        <article id={props.id} class={props.classes} >
			<div class={q(node).property('layout') == 'orange' ? 'uk-container' : ''}>{props.headline}</div>
        </article>
    `

}

(thats working, but putting it into multicolumn renders evertything (article- and div-tags), but not the props (id, class, headline).

This is my MultiColumn.Override.fusion. For any help and feedback i would be very happy.

prototype(Neos.NodeTypes:MultiColumn) {
	attributes {
		class = 'uk-child-width-expand@m'
		uk-grid = ''
	}
	isGrey = ${q(node).property('isGrey') ? 'isgrey' : ''}
	reverseOnMobile = ${q(node).property('reverseOnMobile') ? 'reverseOnMobile' : ''}
	secondColumnOrange = ${q(node).property('layout') == 'color' ? true : false}
	
	columns.iterationName = 'multiColumnIteration'

	# do not add padding to text-element in columns
	prototype(Neos.NodeTypes:Text) {
		@process.wrapWithContainer = ${value}
	}
}
prototype(Neos.NodeTypes.ColumnLayouts:MultiColumn) < prototype(Neos.Neos:ContentComponent) {
	// templatePath = 'resource://hkm.schulcloud/Private/Templates/FusionObjects/MultiColumn.html'
	
	// headerRenderer = hkm.schulcloud:MultiLineHeader
	// header0 = ${q(node).children('header0').get(0)}

    renderer = afx`
        <div class="uk-section uk-section-small uk-section-default">
            <div class="uk-container">
				<div>
					<hkm.schulcloud:MultiLineHeader />
				</div>
                <div>
                    {props.columns}
                </div>
            </div>
        </div>
    `
}

prototype(Neos.NodeTypes:MultiColumnItem) {
	// attributes.class = ${q(node).parent().property('layout') +  ' ' }
	// attributes.class = 'uk-section uk-section-small uk-section-default'
	// attributes.class.@if.cond1 = ${q(node).parent().property('layout') == 'orange'}

	attributes.class = Neos.Fusion:Case {
		if = Neos.Fusion:Matcher {
			condition = ${q(node).parent().property('layout') == 'color'}
			renderer = 'uk-section uk-section-small uk-section-default'
		}
	}


}

(Max-Milan Stoyanov) #2

Is your problem still relevant or did you find a solution?


(Daniel Bischoff) #3

Did’nt found a solution, but it is not relevant anymore…