Skip to content

Releases: wedevelopnl/silverstripe-menustructure

3.0.2

05 Feb 09:12
87b3c19
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.0.1...3.0.2

4.0.1

08 Aug 19:27
0092f11
Compare
Choose a tag to compare

Fix for incorrectly rendered Menu

4.0.0

27 Jul 12:16
67e983a
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.0.1...4.0.0

3.0.1

04 May 07:29
9e50075
Compare
Choose a tag to compare

What's Changed

  • feature/relationeditor: Switched from RecordEditor to RelationEditor … by @DRuiter in #10

Full Changelog: 3.0.0...3.0.1

3.0.0

30 Jan 14:10
c0b0b94
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.0.2...3.0.0

Add query string option

28 Oct 11:16
Compare
Choose a tag to compare
v2.0.2

Add query string option

Add link extension

01 Aug 09:51
Compare
Choose a tag to compare
v2.0.1

Fix cs and add link extend

v2.0.0

20 Jan 18:12
c413217
Compare
Choose a tag to compare

What's Changed

Because of fact that the image relation on the MenuItem model has been removed, we've decided to consider this release as a API change.

The reason we've decided to remove the image from an MenuItem is because we almost never use the image feature.
99% of the situations where we install this module , we've extended MenuItem to remove the image...

Since release 2.0.0 we do this the other way; A menu item doen not have a image, but of course you can extend a MenuItem model to add your own images.

Update from 1.* to 2.*

Situation; You remove the image by an extension on MenuItem

Please remove remove the code that removes the Image field from your MenuItemExtension.
For the rest; in this situation, you can safely update to 2.*.

Situation; You use the MenuItem image from 1.*

In this situation, you need to create a extension on MenuItem.
The following snippets is an simple example how to "restore" the Image property when upgrading to 2.*, you can use this as reference when upgrading;

app/src/Extensions/MenuItemExtension.php

<?php

namespace App\Extensions;

use SilverStripe\Assets\Image;
use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\DataExtension;

class MenuItemExtension extends DataExtension
{
    private static $has_one = [
        'Image' => Image::class,
    ];

    private static $owns = [
        'Image',
    ];

    public function updateCMSFields(FieldList $fields)
    {
        $fields->addFieldToTab('Root.Main', $fields->dataFieldByName('Image')->setFolderName('Menus')->setDescription('Optional image, can be used in some templates.'));

        parent::updateCMSFields($fields);
    }

}

mysite.yml

---
Name: mysite
---
TheWebmen\Menustructure\Model\MenuItem:
  extensions:
    - App\Extensions\MenuItemExtension

Full Changelog: 1.1.0...2.0.0

1.1.0

18 Jan 14:25
Compare
Choose a tag to compare
Feature to add page anchor

1.0.11: Merge pull request #5 from thewebmen/small-fixes

19 Nov 10:08
d1bf2d3
Compare
Choose a tag to compare