Reputation: 119
TYPO3 v8.7.15, News 7.0.4 and rx_shariff 11.0.2
I've enabled three services that can be used to share my news detail pages (FB, Twitter & Mail).
This is my partial(Shariff.html):
<html xmlns:rx="http://typo3.org/ns/Reelworx/RxShariff/ViewHelper">
<rx:shariff data="{url: 'http://example.com/'}" services="facebook,twitter,mail" enableBackend="true" />
</html>
Both the FB and Twitter share buttons work fine, however when I test the Mail button I'm sent to
http://example.com/?view=mail
I've checked the documentation for both News and rx_shariff but can't see anything obvious.
Any help would be appreciated.
Upvotes: 0
Views: 1025
Reputation: 11
The above answer did not work for me, as the variables "url" and "newsTitle" are not are not passed on to the partial. Also, the subject and body should be dynamic. This worked for me:
In Templates Detail.html:
<f:if condition="{settings.detail.showSocialShareButtons}">
<n:extensionLoaded extensionKey="rx_shariff">
<f:render partial="Detail/Shariff" arguments="{newsItem: newsItem}"/>
</n:extensionLoaded>
</f:if>
In Partials Detail/Shariff.html:
<div xmlns:n="http://typo3.org/ns/GeorgRinger/News/ViewHelpers"
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:rx="http://typo3.org/ns/Reelworx/RxShariff/ViewHelper" data-namespace-typo3-fluid="true">
{n:link(newsItem:newsItem, settings:settings, uriOnly:1, configuration:'{forceAbsoluteUrl:1}') -> f:variable(name: 'url')}
<rx:shariff data="{url: url, title: newsItem.title, mail-url: 'mailto:'}" services="facebook,twitter,whatsapp,threema,mail" enableBackend="false" />
</div>
This will give you: mailto:?subject=[TitleOfTheNews]&body=[AbsoulteUrlToTheNews]
Upvotes: 1
Reputation: 874
Try this :
<rx:shariff data="{url: url, title: newsTitle, mail-subject: 'Your mail subject', mail-body: 'The mail body', mail-url: 'mailto:{settings.shariff.mailto}'}" services="facebook,twitter,googleplus,mail" enableBackend="true" />
Upvotes: 1