|
1 | | -prototype(Neos.NeosConIo:SpeakerList) < prototype(Neos.Fusion:Loop) { |
2 | | - // API to the outside: "items" to render |
| 1 | +prototype(Neos.NeosConIo:SpeakerList) < prototype(Neos.Neos:ContentComponent) { |
3 | 2 | items = ${q(node).referenceNodes('eventToShowSpeakersFor').backReferenceNodes("event").filter('[instanceof Neos.NeosConIo:Speaker]').sort('title', 'ASC')} |
4 | 3 |
|
5 | | - @context.eventToFilter = ${q(node).property('eventToShowSpeakersFor')} |
6 | | - @process.wrapWithUl = ${'<ul class="speaker__speakerList">' + value + '</ul>'} |
7 | | - |
| 4 | + renderer = afx` |
| 5 | + <ul class="speaker__speakerList"> |
| 6 | + <Neos.Fusion:Loop items={props.items} itemName="node"> |
| 7 | + <li class="speaker__speakerList__item"> |
| 8 | + <Neos.NeosIo:ImageTeaser |
| 9 | + subTitle="" |
| 10 | + title={q(node).property('title')} |
| 11 | + image={q(node).property('image')} |
| 12 | + text={String.stripTags(q(node).property('company'))} |
| 13 | + className="imageTeaser--speaker" |
| 14 | + > |
| 15 | + <Neos.Neos:NodeUri node={node} absolute={true} @path="link" /> |
| 16 | + </Neos.NeosIo:ImageTeaser> |
| 17 | + </li> |
| 18 | + </Neos.Fusion:Loop> |
| 19 | + </ul> |
| 20 | + ` |
8 | 21 |
|
9 | 22 | @cache { |
10 | 23 | mode = 'cached' |
11 | 24 | entryIdentifier { |
12 | 25 | node = ${Neos.Caching.entryIdentifierForNode(node)} |
13 | 26 | } |
14 | | - tags { |
15 | | - 1 = ${Neos.Caching.nodeTag(node)} |
16 | | - 2 = ${Neos.Caching.nodeTypeTag('Neos.NeosConIo:Talk')} |
17 | | - 3 = ${Neos.Caching.nodeTypeTag('Neos.NeosConIo:Event')} |
18 | | - 4 = ${Neos.Caching.nodeTypeTag('Neos.NeosConIo:Room')} |
19 | | - 5 = ${Neos.Caching.nodeTypeTag('Neos.NeosConIo:Speaker')} |
20 | | - } |
21 | | - } |
22 | | - |
23 | | - |
24 | | - itemName = "node" |
25 | | - itemRenderer = Neos.Fusion:Tag { |
26 | | - tagName = 'li' |
27 | | - attributes.class = 'speaker__speakerList__item' |
28 | | - content = Neos.NeosIo:ImageTeaser { |
29 | | - // node is the speaker here |
30 | | - subTitle = "" |
31 | | - title = ${q(node).property('title')} |
32 | | - image = ${q(node).property('image')} |
33 | | - text = ${String.stripTags(q(node).property('company'))} |
34 | | - |
35 | | - // Ensure Text has no tags (especially link tag) in the markup, as this |
36 | | - // will otherwise lead to two nested <a> tags which makes the browser break. |
37 | | - text.@process.stripTags = ${String.stripTags(value)} |
38 | | - className = 'imageTeaser--speaker' |
39 | | - link = Neos.Neos:NodeUri { |
40 | | - node = ${node} |
41 | | - absolute = true |
42 | | - } |
| 27 | + entryTags { |
| 28 | + node = ${Neos.Caching.nodeTag(node)} |
| 29 | + events = ${Neos.Caching.nodeTypeTag('Neos.NeosConIo:Event', node)} |
| 30 | + speakers = ${Neos.Caching.nodeTypeTag('Neos.NeosConIo:Speaker', node)} |
43 | 31 | } |
44 | 32 | } |
45 | 33 | } |
0 commit comments