featdd / dpn_glossary

Glossary extension for TYPO3
http://typo3.org/extensions/repository/view/dpn_glossary
GNU General Public License v2.0
20 stars 29 forks source link

[FEATURE] Limit parsing of DOM to configurable node/tag (ID) #186

Closed julianhofmann closed 1 year ago

julianhofmann commented 1 year ago

Introduces new setting limitParsingId which can be used to limit the parsing to a certain node/tag with this id.

If set, the parser loads the full page in a DOMdocument, extracts the configured node/tag as a separate DOMdocument, pareses only this much smaller DOMdocument, and replaces the node/tag in the DOMdocument of the whole page.

This way only the relevant part of a page must be parsed. Mostly, you have already some kind of wrapper around your content and only this content is relevant to the glossary. Navigations (in particular megamenus), sidebars, etc. don't need to be checked for matching XPaths or terms anymore.

Fixes: #185

featdd commented 1 year ago

Hi @julianhofmann,

thanks for this, I'll check this out as soon as I find the time.

Greetings Daniel

featdd commented 1 year ago

Hi @julianhofmann,

thanks for your work, I merged this here: 876c74abf72b77d23e65c3a5d7dc006878c0182c