diff --git a/Resources/Private/Partials/JoblistListSchema.html b/Resources/Private/Partials/JoblistListSchema.html new file mode 100644 index 0000000000000000000000000000000000000000..6fe348c4dd52251e93d66113069efa677fb9a4b7 --- /dev/null +++ b/Resources/Private/Partials/JoblistListSchema.html @@ -0,0 +1,18 @@ +<f:alias map="{leftBrace: '{', rightBrace: '}'}"> + <script type="application/ld+json"> + {leftBrace} + "@context": "http://schema.org/", + "@type": "ItemList", + "itemListElement": [ + <f:for each="{jobs}" as="job" iteration="iterator"> + {leftBrace} + "@type": "ListItem", + "position": "{iterator.cycle}", + "url": "<f:uri.action pageUid="{settings.applyPage}" controller="Joblist" action="applyForm" arguments="{jobId: job.uid}" absolute="TRUE"/>" + {rightBrace}<f:if condition="{iterator.isLast} == FALSE">,</f:if> + </f:for> + ], + "numberOfItems": "{jobs->f:count()}" + {rightBrace} + </script> +</f:alias> diff --git a/Resources/Private/Templates/Joblist/Index.html b/Resources/Private/Templates/Joblist/Index.html index d63396517a6bf1d03846fb15ce7ccead0a6a6f83..fe82c6d7fbed2a8f5e9397ed70055ce4da684791 100644 --- a/Resources/Private/Templates/Joblist/Index.html +++ b/Resources/Private/Templates/Joblist/Index.html @@ -1,24 +1,7 @@ {namespace sg=SGalinski\SgJobs\ViewHelpers} <f:layout name="Default" /> <f:section name="main"> - <f:alias map="{leftBrace: '{', rightBrace: '}'}"> - <script type="application/ld+json"> - {leftBrace} - "@context": "http://schema.org/", - "@type": "ItemList", - "itemListElement": [ - <f:for each="{jobs}" as="job" iteration="iterator"> - {leftBrace} - "@type": "ListItem", - "position": "{iterator.cycle}", - "url": "<f:uri.action pageUid="{settings.applyPage}" controller="Joblist" action="applyForm" arguments="{jobId: job.uid}" absolute="TRUE"/>" - {rightBrace}<f:if condition="{iterator.isLast} == FALSE">,</f:if> - </f:for> - ], - "numberOfItems": "{jobs->f:count()}" - {rightBrace} - </script> - </f:alias> + <f:render partial="JoblistListSchema" arguments="{_all}" /> <div id="sgjobs-joblist"> <f:render