Commit 2ffd140c authored by Mike Rockétt's avatar Mike Rockétt

add support for PW2.8

parent 0955df51
{
"title": "Sitemap",
"version": "0.2.2",
"version": "0.2.3",
"author": "Mike Rockett",
"summary": "Renders a sitemap for your ProcessWire powered site. Supports multi-language, multi-site, and image sub-elements. Adapted from MarkupSitemapXML.",
"href": "http://github.com/rockettpw/markup-sitemap",
"hrefsupport": "https://processwire.com/talk/topic/17068-markupsitemap/",
"license": "MIT",
"hreflicense": "http://mit-license.org/",
"requires": "ProcessWire>=3.0.0, PHP>=5.6.0",
"requires": "ProcessWire>=2.8.0, PHP>=5.6.0",
"permanent": false,
"autoload": true,
"singular": true
......
......@@ -143,10 +143,11 @@ class MarkupSitemap extends WireData implements Module
$templateFields->save();
}
// Then delete the fields
$field = $fields->get($fieldName);
$field->flags = Field::flagSystemOverride;
$field->flags = 0;
$fields->delete($field);
if ($field = $fields->get($fieldName)) {
$field->flags = Field::flagSystemOverride;
$field->flags = 0;
$fields->delete($field);
}
}
}
......
## Sitemap for ProcessWire
![Shield: Status = Beta](https://img.shields.io/badge/status-beta-orange.svg?style=flat-square)![Shield: Version = 0.2.2](https://img.shields.io/badge/version-0.2.2-blue.svg?style=flat-square)![Shield: License = MIT](https://img.shields.io/github/license/rockettpw/markup-sitemap.svg?style=flat-square)
![Shield: Version = 0.2.3-beta](https://img.shields.io/badge/version-0.2.3_beta-orange.svg?style=flat-square) ![Shield: Version = 0.2.3](https://img.shields.io/badge/requires_ProcessWire-2.8+-green.svg?style=flat-square) ![Shield: License = MIT](https://img.shields.io/github/license/rockettpw/markup-sitemap.svg?style=flat-square)
An upgrade to MarkupSitemapXML by Pete, MarkupSitemap adds multi-language support using the built-in LanguageSupportPageNames. Where multi-language pages are available, they are added to the sitemap by means of an alternate link in that page’s `<url>`. Support for listing images in the sitemap on a page-by-page basis and using a sitemap stylesheet are also added.
......
......@@ -11,8 +11,6 @@
namespace Rockett\Utilities;
use ProcessWire\Field;
trait Fields
{
/**
......@@ -48,11 +46,11 @@ trait Fields
}
// Set the initial properties
$field = new Field();
$field = new \Field();
$field->type = $this->modules->{"Fieldtype{$fieldType}"};
$field->name = $name;
if ($system === true) {
$field->set('flags', Field::flagSystem);
$field->set('flags', \Field::flagSystem);
}
// Unset extra meta (already used)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment