[TYPO3-german] TypoScript - Meta Description aus dem Content

Gregor Hermens gregor at a-mazing.de
Wed Mar 8 17:34:17 CET 2017


Hallo Bavra,

bavramor wrote:

> Hi, ich würde gerne aus dem 1 Beitrag der Spalte rechts den Text gecroppt
> in die Seiten Description packen. Ich habe es wie folgt probiert:
> 
> page.meta.description.ifEmpty.stdWrap.cObject = CONTENT
> page.meta.description.ifEmpty.stdWrap.cObject {
>  
>   table = tt_content
>   select {
>     orderBy = sorting
>     where = colPos=0
>   }
>  
> }
> 
> Das Ergebnis ist nicht ganz verkehrt. Allerdings bekomme ich die Ganze
> Spalte nun mit HTML-Code und so angezeigt. Kann mir da jemand helfen?

- Um das auf das erste Inhaltselement der Spalte zu beschränken:

...
  select {
    ...
    max = 1
  }
....

https://docs.typo3.org/typo3cms/TyposcriptReference/7.6/Functions/Select/Index.html


- Um das HTML loszuwerden:

...
page.meta.description.ifEmpty.stdWrap.cObject {
  stdWrap.stripHtml = 1
...

https://docs.typo3.org/typo3cms/TyposcriptReference/7.6/Functions/Stdwrap/Index.html#striphtml

hth
Gregor
-- 
http://www.a-mazing.de/   |   Certified TYPO3 Integrator



More information about the TYPO3-german mailing list