update tags on page save
the list of tags was not being updated when an edited page was saved, which is needed for the front end tags page. all cleaned up and active
This commit is contained in:
parent
234453b900
commit
69eb9905a2
3 changed files with 8 additions and 2 deletions
|
@ -133,7 +133,7 @@ class PageRepository implements PageRepositoryInterface
|
|||
//upadte settings if needed
|
||||
$body->path = $path;
|
||||
$this->settings->updateMenu($body);
|
||||
//Settings::updateTags();
|
||||
$this->settings->updateTags($this->sort->tags());
|
||||
// if new page added, update current index in Settings file
|
||||
if ($task == 'create') {
|
||||
$this->settings->updatePageIndex();
|
||||
|
|
|
@ -97,6 +97,11 @@ class SettingsService
|
|||
$this->docs->writeSettings($settings);
|
||||
}
|
||||
|
||||
public function updateTags($update)
|
||||
{
|
||||
$this->docs->writeSettings($update, env('TAGS_PATH'));
|
||||
}
|
||||
|
||||
public function sync($data)
|
||||
{
|
||||
//dd($data->global->renderOnSave);
|
||||
|
|
|
@ -60,13 +60,14 @@ class SortingService
|
|||
}
|
||||
$tagData = [];
|
||||
|
||||
//dd($this->settings->getTags()['pages']);
|
||||
$tagData = [
|
||||
'debug' => $debug, // for theme kit
|
||||
'tags' => $this->p_tags,
|
||||
'theme' => $this->info['theme'], // for theme kit
|
||||
'title' => 'Pages Tagged as Tag',
|
||||
'dynamicRender' => $this->info['dynamicRender'],
|
||||
'pages' => $this->settings->getTags()[3]['pages'],
|
||||
'pages' => $this->settings->getTags()['pages'],
|
||||
'info' => $this->info,
|
||||
'menu' => $this->settings->getMenu(),
|
||||
'media' => [
|
||||
|
|
Loading…
Reference in a new issue