Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A plugin for the Redaxo5 addon yrewrite. With it the pages end with .html
<?php
rex_yrewrite::setScheme(new rex_yrewrite_scheme_html());
<?php
/**
* Created by PhpStorm.
* User: oliver.hoerold
* Date: 24.10.2016
* Time: 14:45
*/
class rex_yrewrite_scheme_html extends rex_yrewrite_scheme {
public function appendArticle($path, rex_article $art, rex_yrewrite_domain $domain) {
if ($art->isStartArticle() && $domain->getMountId() != $art->getId()) {
return $path . '.html';
}
return $path . '/' . $this->normalize($art->getName()) . '.html';
}
}
package: yrewrite/html-suffix
version: '1.0'
author: Oliver Hörold
supportpage: https://gist.github.com/omphteliba/96d49f6b57f0e5e91b20db54962f7a4b

yrewrite-plugin: html-suffix

Stellt die alte Funktionalität wieder her bei der die Seiten auf ".html" und nicht auf "/" enden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.