add teasertext to mail body

Issue #5 closed
Markus Dübbert created an issue

Is there a possibility to add e.g. a teasertext from the corresponding page (e.g.) tx_news teasertext to the mail body?

Now there is only the Link to the Page in the Email Body.

Comments (7)

  1. Markus Dübbert reporter

    but you can only set static Text here, right?

    That means: No dynamic teasertext, e.g Or e.g. the Article Headline dynamically in the subject?

  2. Markus Klein

    You know the teasertext and the headline when rendering the page anyway, you can put it there as well in your news template.

    As you can see here https://github.com/heiseonline/shariff/blob/develop/src/js/shariff.js#L81 there is still other means to extend Shariff. For instance, initialize Shariff manually in your JS and assign your custom mailBody JS function. You can do whatever you want there. (to avoid auto-initialization do not use the shariff CSS class on the element)

  3. Markus Dübbert reporter

    ah, you mean something like:

    <html xmlns:rx="http://typo3.org/ns/Reelworx/RxShariff/ViewHelper">
      <rx:shariff data="{url: 'http://example.com/'}" services="whatsapp,facebook,xing" enableBackend="true" />
    </html>
    
  4. Markus Klein

    Well, if you need such advanced special features, the viewhelper is not the right thing for you, since it automatically produces output like: <div class="shariff"... And this is not what you want, if you intend to play advanced games with custom JS functions/options for the Shariff object.

    I suggest taking a closer look at https://github.com/heiseonline/shariff/blob/develop/src/js/shariff.js to get a clue how the internals roughly work. Specifically the initialization at the very bottom and the default options and how they are constructed and overwritable.

  5. Markus Dübbert reporter

    ok, thanks. I changed the js file a bit, then it works.

    The Extension news already generates the title and the teaser text in og:title and og:description meta tags in the page. I used this for the mail body and subject text.

  6. Log in to comment