TYPO3-Headless / headless_news

Adds support for EXT:news to EXT:headless
MIT License
11 stars 18 forks source link

Tags List template: /headless_news/Resources/Private/News/Templates/Tag/List.html #17

Closed bk-damian-slomian closed 3 years ago

bk-damian-slomian commented 3 years ago

The seo part is wrong. Should be:

<f:section name="TagsListView">
    <f:spaceless>
        <f:format.raw>
            <f:format.json value="{
              id: tagItem.uid,
              pid: tagItem.pid,
              title: tagItem.title,
              seo: {
                **seoTitle: tagItem.seoTitle,
                seoDescription: tagItem.seoDescription,
                seoHeadline: tagItem.seoHeadline,
                seoText: tagItem.seoText**
              },
              slug: '{f:uri.page(pageUid: settings.listPid, additionalParams: \'{tx_news_pi1: \\\'{overwriteDemand: \\\\\\\'{tags: tagItem.slug}\\\\\\\'}\\\'}\')}'
                }"/>
        </f:format.raw>
    </f:spaceless>
</f:section>
bk-damian-slomian commented 3 years ago

Same problem in: /headless_news/Resources/Private/News/Partials/Tags.html

<f:spaceless>
    [<f:for each="{tags}" as="tag" iteration="tagIterator">
        <f:format.raw>
            <f:format.json value="{
              id: tag.uid,
              pid: tag.pid,
              title: tag.title,
              seo: {
                **seoTitle: tag.seoTitle,
                seoDescription: tag.seoDescription,
                seoHeadline: tag.seoHeadline,
                seoText: tag.seoText**
              },
              slug: tag.slug
            }"/>
        </f:format.raw>
        {f:if(condition: tagIterator.isLast, else: ',')}
    </f:for>]
</f:spaceless>
tmotyl commented 3 years ago

@bk-damian-slomian thanks for your feedback, can you send a Pull Request? Thanks

bk-damian-slomian commented 3 years ago

Done

tmotyl commented 3 years ago

thanks @bk-damian-slomian and congratulations on your first contribution! I'm closing the issue as it was fixed with https://github.com/TYPO3-Initiatives/headless_news/pull/18