Closed medarob closed 4 years ago
Is'nt this just adding the <rx:shariff services="facebook,xing,twitter" enableBackend="true" />
viewHelper to the template?
That could work for all events. I used the EXT:news approach but without the condition check if the option was enabled (there is no such field). So, there came the idea maybe to add this function globally via an on/off checkbox?
News uses this code:
<f:if condition="{settings.detail.showSocialShareButtons}">
<f:comment>
Care about the privacy of your readers?
Checkout https://typo3.org/extensions/repository/view/rx_shariff
and it will be used automatically!
</f:comment>
<n:extensionLoaded extensionKey="rx_shariff">
<f:render partial="Detail/Shariff" />
</n:extensionLoaded>
</f:if>
and an extra partial Detail\Shariff.html with
<div xmlns:rx="http://typo3.org/ns/Reelworx/RxShariff/ViewHelper" data-namespace-typo3-fluid="true">
<rx:shariff services="facebook,xing,twitter" enableBackend="true" />
</div>
But I don't know why the extra partial is needed here and why not use
It probably checks with <n:extensionLoaded extensionKey="rx_shariff">
if the extension is installed?
Anyways, with the condition and the extra check field in the backend the option can be switched on/off by an editor in the backend. I thought this would be an editor friendly way to add those buttons.
Edit: In ext:blog there is also an option for the editor to enable or disable share button for each blog entry in the page properties. So, it's not that uncommon to have the option available in the backend.
Long story short - I think this is something an integrator should take care of when implementing the custom Fluid view for the event detail view. The templates that come with the extension are more rudimentary and not suitable for production usage (never seen someone using the default templates on a website)
Having another field in the event record to enable (or disable) social share buttons is sadly also something I see no real benefit in. Either they are turned on globally or not, which is easily possible directly in the template as explained above.
I'm closing this issue, since implementation of social media share buttons is not planned and can be achieved globally with Fluid / JavaScript.
Like ext:news it would be cool to have the social share button option based on the shariff extension available by default in the event detail page. Maybe a global backend option is possible to disable/enable them by default?