Zum Inhalt springen

eigene Attribute zulassen - Rich snippets

Erstellt am 6. Juni 2012 · 1 Antwort · letzte Antwort am 1. Dezember 2012

Tags: Frage

Toccamonium ·

Hi,

damit Google bestimmten Inhalt besser semantisch erfassen kann, wollte ich für den RTE eigene Tags zulassen > Rich snippets. Leider schmeißt mir der Parser diese immer wieder raus. iframe/object funktioniert hingegen einwandfrei.

Hat jemand eine Idee, woran das liegen könnte, dass z.B.
<div itemprop="test"> wieder auf <div> zurückgesetzt wird?

RTE.default.proc {
  # Allow embed (Youtube) HTML tags in the RTE
  allowTags := addToList(object,param,embed,iframe,itemprop)
  allowTagsOutside := addToList(object,embed,iframe,itemprop)
  entryHTMLparser_db.allowTags < RTE.default.proc.allowTags
  entryHTMLparser_db.tags {
				p.fixAttrib.align.unset >
				p.allowedAttribs = class,style,align,itemprop,itemtype
 
				div.fixAttrib.align.unset >
				div.allowedAttribs = class,style,align,itemprop,itemtype
 
			}
}
# Allow embed (Youtube) HTML tags in the RTE
lib.parseFunc_RTE.allowTags := addToList(object,param,embed,iframe,itemprop)

Danke!
TC

connor ·

Hallo Toccamonium,
das hier fehlt noch:

- keepPDIVattrib = ...
- itemscope als Attribut mit aufnehmen!

Der RTE macht daraus itmescope="".
In diesem Fall setzt man itemscope="itemscope"

RTE.default.proc {
...
 keepPDIVattribs = class,style,align,itemscope,itemtype,itemprop
 entryHTMLparser_db.tags {
				p.fixAttrib.align.unset >
				p.allowedAttribs = class,style,align,itemscope,itemtype,itemprop
 
				div.fixAttrib.align.unset >
				div.allowedAttribs = class,style,align,itemscope,itemtype,itemprop
 
			}
}

LG Connor