Git Product home page Git Product logo

silverstripe-blocks's People

Contributors

alexoconner avatar anselmdk avatar beerbohmdo avatar chillu avatar christopherdarling avatar dhensby avatar diegotrout avatar doniz avatar hdpero avatar jackoconnor21 avatar jonom avatar jsirish avatar michaeljjames avatar micschk avatar mooror avatar muskie9 avatar nyeholt avatar phillprice avatar robbieaverill avatar rotassator avatar sheadawson avatar taitava avatar tractorcow avatar xini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silverstripe-blocks's Issues

Templates includes folder should start with captal i

Hello,
I'm new with SilverStripe but it seems that the folder "blocks/templates/includes" should instead be called
"blocks/templates/Includes" to be compatible to the default structure of the template and therefore allow template files to be overridden.

(This is a problem only on case sensitive file systems)

Thanks.

Blocks do Not appear in SS 3.5.0

Blocks do Not appear in SilverStripe 3.5.0
No errors are given in PHP, MySql, Apache logs
PHP 5.6.27
MySQL 5.6.33
Tried Cache flushing, set to Dev

Block data creation in Admin seems to work fine
Data input in Admin does make it to MySql

Block Data is Not out put to the template
Tried with base install with simple theme
Tried custom Block.ss templates in theme with No result. Block data still did not output in template

Shortcodes

Just wondering how to enable Shortcode parsing in Content Blocks using Shortcodeable module

Applying a blockset to a tree node _doesn't_ apply it to that node itself

I can't remember if this was a specific design decision or not, but - if I apply a blockset to a particular node, the children of that node have that blockset applied to it, but the selected node itself doesn't. Is there another way to do this - ie apply a blockset to a node and all its children (instead of just the children?). The logic change is straightforward

$ancestors = $this->owner->getAncestors()->column('ID');        
// add ourselves to the lookup tree
$ancestors[] = $this->owner->ID;

but I'm not sure if this is intended functionality or not

Always populate the Sort field in the SiteTree_Blocks table

For now, the Sort field always has a value of zero unless the user has performed some drag&drop actions. Usually this works good, as new blocks appear after old ones when they are created. However, my database seems to occasionally rearrange the order of how the Block records are stored in the database, which means that my blocks randomly jump around every now and then. The solution is to manually drag&drop them to correct positions, but it could be better if the Sort field would get a correct value at the very beginning :). I know this perhaps does not come up on all environments, so perhaps not everyone has noticed this.

Perhaps I will create a PR for this myself, but for now I will just raise an issue about it, as I don't have time atm to fix this and it's also good to hear opinions about this. Thanks! :)

Add screenshots

Will make the concept much easier to understand I think :)

Feature Idea: 'internal' title

For some kinds of Blocks, it makes sense to have a single, mostly-unique title. This makes it easy to search for the specific Block in the CMS, and provides a descriptor to the end user.

Some Blocks, however, don't need a title for the end-user, as they may be making use of an external API or using some kind of rich media. Other Blocks would benefit from having a title that's contextually descriptive ("Contact Me!" or "Open Hours"), but not necessarily unique to that Block. Both these cases make it hard to find an existing Block to include it, as the Title is either blank or non-unique.

Proposal: split Title into two, like it is for SiteTree (Title and MenuTitle). One Title is meant for internal use (how you'd describe it in the CMS so you can find it easily) while the other is for showing on the front-end (optional). A similar default behavior to SiteTree could be set up to keep things simple for Block creators who don't need this differentiation.

Current page context?

Hey Shea,

Is it possible to get the current page from inside a Block template and how do you do that?

Translatable Compatabilty

Just wondering if you have any guidance on implementing silverstripe translatable for the module?

Seemingly random order of blocks

I had a very strange issue when working with this awesome blocks plugin. I created multiple blocks (without ever rearranging them, because I created them already in the right order) and then they got displayed in different orders from time to time.

To find the source of the issue I looked inside the database and found that the sort order depends on a Sort field in SiteTree_Blocks which seems to be 0 whenever a new block is created.

Once I manually rearranged the blocks via drag and drop the sort fields got filled with numbers from 1 to N. And now they are displayed in the correct order every time.

This kind of "workaround" is enough for me, but once this page is handed over to the client, this behavior may confuse him. Is there an easy way to fix that issue (and fill the Sort column already when the field gets created)?

No blocks tab in page view on SS 3.5.3

Hi there, I've installed the latest version of silverstripe-blocks via composer on a fresh install of SS 3.5.3 but I am not seeing the blocks tab in the page view.

I do see the 'Blocks Model Admin' section in the dashboard, and can create a block fine there, but the functionality is missing from the pages. I have read through your readme a couple of times, and not sure if I've missed something. I have flushed after updating yml and template files. Any advice would be appreciated - thanks.

mysite/_config/config.yml:

BlockManager:
  areas:
    MyBlockArea: true

... / Layout/Page.ss:

<article>
 <h1>$Title</h1>
  $BlockArea(MyBlockArea)
 <div class="content">$Content</div>
</article>

Remove the need to edit template files

I've only used the module a short time (I was developing something similar - but this is way better in most departments) but one thing that immediately struck me was that I needed to physically edit template files to add the block locations.

I've added some incomplete mods (but if you pull the code you'll see where I'm headed) that remove the need to do this and instead rely on the user in the CMS ordering arbitrary named blocks. These are passed onto SSViewer which then pushes them to the template's default $Content placeholder, with the actual Content and any additional blocks above or below it.

At the moment it's a simply Textfield in the settings area. But that of course means the same "configuration" everywhere. This could easily be changed to be done on a page by page basis, just porting the logic off the SiteConfig DataExtension onto a Page DataExtension. If I get time, I'll finish it off, this was about ~5h work on company hackday a couple of weeks ago.

See the "master-russ" branch on my fork and let me know if I'm on or completely off track with it :-)

Dynamic blocks

Hi @sheadawson

Please let me know if this is the wrong way to ask, but I wonder whether you have thought about making the position/number of blocks dynamic rather than having "Sidebar", "Before Content" and "After Content".

For example, it may be useful to have any number of blocks (already doable) and have them be part of the actual page content rather than not shown in the WYSIWYG editor at all, and let them be reordered as the content editor requires.

Your thoughts.

Thanks,
Robbie

Integrating Site Search

Any tips on integrating content blocks in site search? Maybe I jumped the gun by instaaling Searchable DataObjects since it just gives links to the blocks in the page instead of the page.

has_many inside block?

Hi,

Ive got this block called EmployeesBlock, in which I want to create multiple employees.
For some reason I can't get it to loop the Employees in the code... Is there anything I'm doing wrong in relation to having a loop inside a Block ?

EmployeesBlock.php

<?php

class EmployeesBlock extends Block {
    private static $db = array (
    );

    private static $has_one = array (
    );

    private static $has_many = array (
        "Employees" => "Employee"
    );


public function getCMSFields()
    {
        $fields = parent::getCMSFields();

        // Viewer groups
        $fields->removeFieldFromTab('Root', 'ViewerGroups');
        return $fields;
    }

}

Employee.php

<?php

class Employee extends DataObject {
    private static $db = array (
        'Text' => 'HTMLText'
            );

    private static $has_one = array (
        'Image' => 'Image',
        'EmployeesBlock' => 'EmployeesBlock'
    );


public function getCMSFields()
    {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab("Root.Main", UploadField::create('Image', 'Employee image'));
        $fields->addFieldToTab("Root.Main", HTMLEditorField::create('Text', 'Employee text')->setRows(3));
        return $fields;
    }

}

EmployeesBlock.ss

<% loop $Employees %>
    <div class="employee <% if $Odd %>uPullLeft<% else %>uPullRight<% end_if %>">
        <div class="employeeImage">
            <img src="$Image.URL" alt="" class="uFullWidth" />
        </div>
        <div class="employeeText">$Text</div>
    </div>
<% end_loop %>

Validation for title is not working on save and publish button

Validation for title is working when we click on save button, but it is not working when we click on save and publish button.

It seems like error with betterbutton.

My silverstripe version is 3.2.1

Error is as given below:-

ERROR [User Warning]: Can't find /0 in stage Stage IN POST /admin/pages/edit/EditForm/field/Blocks/add-multi-class/ContentBlock/ItemEditForm?Locale=en_NZ Line 851 in /var/www/mbie/framework/model/Versioned.php Source ====== 842: $conn = DB::get_conn(); 843: if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing($baseClass, true); 844: $from->write(); 845: if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing($baseClass, false); 846: 847: $from->destroy(); 848: 849: Versioned::set_reading_mode($oldMode); 850: } else { * 851: user_error("Can't find {$this->owner->URLSegment}/{$this->owner->ID} in stage $fromStage", E_USER_WARNING); 852: } 853: } 854: 855: /** 856: * Set the migrating version. 857: * Trace ===== user_error(Can't find /0 in stage Stage,512) Versioned.php:851 Versioned->publish(Stage,Live) call_user_func_array(Array,Array) Object.php:707 Object->__call(publish,Array) GridFieldBetterButtonsItemRequest.php:305 ContentBlock->publish(Stage,Live) GridFieldBetterButtonsItemRequest.php:305 GridFieldBetterButtonsItemRequest->publish(Array,Form,SS_HTTPRequest) call_user_func_array(Array,Array) Object.php:707 Object->__call(publish,Array) Form.php:462 GridFieldAddNewMultiClassHandler->publish(Array,Form,SS_HTTPRequest) Form.php:462 Form->httpSubmission(SS_HTTPRequest) RequestHandler.php:288 RequestHandler->handleAction(SS_HTTPRequest,httpSubmission) RequestHandler.php:200 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) RequestHandler.php:222 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) GridField.php:973 GridField->handleRequest(SS_HTTPRequest,DataModel) RequestHandler.php:222 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) RequestHandler.php:222 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) Controller.php:157 Controller->handleRequest(SS_HTTPRequest,DataModel) LeftAndMain.php:451 LeftAndMain->handleRequest(SS_HTTPRequest,DataModel) AdminRootController.php:93 AdminRootController->handleRequest(SS_HTTPRequest,DataModel) Director.php:385 Director::handleRequest(SS_HTTPRequest,Session,DataModel) Director.php:149 Director::direct(/admin/pages/edit/EditForm/field/Blocks/add-multi-class/ContentBlock/ItemEditForm,DataModel) main.php:184

SilverStripe 3.2 compatibility

With v3.2.0-rc1, a final version of SilverStripe v3.2 is eminent. So...any chance we can get this addon updated to allow for installation on v3.2.x? :)

Missing add button

Hello.

I can't get the Add button to display in the edit page.

I've installed the module through composer, copied the sample YAML, added the snippet to my template (and checked it by clicking the preview). Iv'e flushed 1'd and dev/builded my little heart out. No add button.

Any gentle kicks towards figuring out what i have done wrong?

Can't click grid rows

I notice you can't click anywhere on a grid row to edit a block like you can with most other grid fields, and wondered if that is deliberate or maybe a side effect of having form controls within the rows? I can't seem to re-train my brain to click the edit button instead of the row so would be cool if we could make the row clickable :)

Uncaught Exception: Object->__call(): the method 'getversionedstages' does not exist on 'CustomBlock'

I recently updated an old site to a new version of SilverStripe (currently 3.1.2, but looking into 3.2). I also updated silverstripe-blocks from 0.x to 1.x. I followed the migration guide, and all the blocks work nicely on my site, but when in admin UI I try to create blocks to a new page, I get this error

Uncaught Exception: Object->__call(): the method 'getversionedstages' does not exist on 'CustomBlock'

My CustomBlock class looks bascially like this (I omitted db fields and CMS fields since they don't seem to affect the issue);

class CustomBlock extends Block
{
    private static $singlar_name = 'Custom Block';
    private static $plurar_name = 'Custom Blocks';

    private static $db = array(
    );

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        return $fields;
    }
}

I can fix it by adding

public function getVersionedStages() {
    return $this->stages;
}

to my CustomBlock class, but isn't this something Block should handle since it implements the versioning?

Boolean config settings for enabled area types don't work

ReadMe shows an example of disabling an area type with boolean value but BlockManager::getAreasForPageType() only filters on 'only' and 'except' values.

BlockManager:
  themes:
    simple:
      areas:
        Sidebar: false # Does not work
        Sidebar:
          only: ImaginaryPageType # Works

This page type has no Block Areas configured

Whatever I do in config.yml, I always get in the Blocks tab of the pages:

This page type has no Block Areas configured.

Tried (my theme is called main):

BlockManager:
themes:
main:
BlockArea:
Sidebar: true

BlockManager:
themes:
main:
area:
Sidebar: true

BlockManager:
themes:
main:
area:
ContentBlock: true

etc. etc.

SilverStripe 3.3.1

Wrapping base ContentBlock in config use_default_blocks doesn't undefine it

This method doesn't allow creation of a replacement ContentBlock class (class already defined).
This method also causes a 'Uncaught ReflectionException: Class ContentBlock does not exist' error.

Suggestion would be to remove the ContentBlock class definition altogether and place it in the README as an example.

Error

Using php 5.6.28
MySql 5.6.34

PHP Fatal error: Class 'SilverStripe\Core\Config\Config' not found in /Applications/MAMP/htdocs/porproducts.com/code/blocks/_config.php on line 10

However the File does exist and I have changed it's permissions to test if it is that and I am not removing or blocking the requirement

Cannot add new DataObjects that extend SiteTree when using Blocks

We have a custom data object that extends SiteTree, we are also using the Blocks extension. This results in us being unable to add new instances of our custom data object under our own ModelAdmin because you cannot use GridFieldOrderableRows with an unsaved many to many collection as described in this open issue with gridfieldextension symbiote/silverstripe-gridfieldextensions#113. The issue does not effect new objects that are created via the Pages admin because in Pages admin, a new object is saved as a draft before the form is loaded but this is not the case if you use your own admin class. We get the following error in our logs:

[14-Dec-2016 14:07:34] Warning at gridfieldextensions/code/GridFieldOrderableRows.php line 146: Argument 1 passed to GridFieldOrderableRows::getSortTable() must be an instance of DataList, instance of UnsavedRelationList given, called in /var/www/html/gridfieldextensions/code/GridFieldOrderableRows.php on line 250 and defined (http://amadeus.dev:32821/admin/public-courses/PublicCourseOutline/EditForm/field/PublicCourseOutline/item/new)

IMO the blocks tab should not be loaded at all until the data object has been saved. We get around the issue by adding the following to our data object's getCMSFields:

if (!$this->isInDB()) {
        $fields->removeFieldFromTab("Root", "Blocks");
}

However IMO the SiteTree extension should be checking this itself to properly address the issue. Will open a PR if I get a chance.

Can't add blocks (on page or blocks admin

Hi, I have a new setup using your module and can't see the add block buttons. I've seen there was a similar issue here before but it was never confirmed solved (or bug).

I'm not sure how to debug this so any guidance would be appreciated. Here's all the info I think could be relevant, please let me know if I can be of any more assitance โœŒ๏ธ

config.yml

# Blog manager
BlockManager:
  themes:
    themename:
      areas:
        AfterContent: true
      use_blocksets: true
      use_extra_css_classes: true 
  use_default_blocks: false

composer.json

"require": {
        "php": ">=5.3.4",
        "silverstripe/cms": "3.3.1",
        "silverstripe/framework": "3.3.1",
        "silverstripe/siteconfig": "3.3.1",
        "silverstripe-australia/gridfieldextensions": "~1.1",
        "quadra-digital/silverstripe-card-layout": "dev-develop",
        "quadra-digital/silverstripe-sonos": "dev-develop",
        "silverstripe/userforms": "^3.1",
        "sheadawson/silverstripe-blocks": "^1.0"
    },
    "require-dev": {
        "phpunit/PHPUnit": "~3.7"
    },
    "extra": {
        "branch-alias": {
            "3.x-dev": "3.3.x-dev"
        }
    },
    "config": {
        "process-timeout": 600
    },
    "prefer-stable": true,
    "minimum-stability": "dev"
}
PHP 5.6.16 (cli) (built: Nov 27 2015 20:51:53)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

screen shot 2016-05-23 at 11 55 24
screen shot 2016-05-23 at 11 55 50

Nesting blocks

What is the suggested procedure to nest blocks? I would like to create a Row block, inside it some Column blocks and inside them other blocks (images, text, galleries..).

Question: does versioning only save 2 stages?

I'm considering to use this module on a new project to completely replace the content area, as I feel it get's more and more obsolete the more sophisticated blocks are getting, and feels a little redundant.
The content area however has one important feature, which is the History tab, where you can see all previous versions and compare.

It seems to me that this module only supports 2 versions? I'm attaching a screenshot.

screenshot 2016-04-15 07 43 11

I'd love to have similar functionality to the History tab, but I could imagine this to be complicated. What are your thoughts on this topic?

Missing compatibility with 3.2 / 3.3.

I'm getting the following when trying to install:

sheadawson/silverstripe-blocks dev-master requires silverstripe/cms 3.1.* -> satisfiable by silverstripe/cms[3.1.x-dev].

Are there any blockers that prevent the module from being compatible with 3.2/3.3 ?

BlockManager::getTheme() ignoring theme from SiteConfig ?

Hi should the getTheme() method look, if there is a theme defined in SiteConfig?
In my case the SSViewer.theme is empty, so it always falls back to default although there is a theme defined in SIteConfig.

Proposal:

    private function getTheme(){
        $currentTheme = Config::inst()->get('SSViewer', 'theme');
        if( class_exists('SiteConfig') ) { // supporting cms-less installations
            if ($siteconfigTheme = SiteConfig::current_site_config()->Theme ) {
                $currentTheme = $siteconfigTheme;
            }
        }
        return $currentTheme ? $currentTheme : 'default';
    }

duplicate blocks when duplicating page

Is there any way to also duplicate all blocks on a page when duplicating a page using them? I guess that might be possible by overriding Page::onBeforeDuplicate but I didn't get it working yet. Did anybody did something already?

The Blocks tab doesn't appear in ss3.3.2 and ss3.4.0

Hi,
In the pages the tab Blocks doesn't appear in ss3.3.2 and ss3.4.0 with silverstripe-blocks versions 1.0.8 and above (tested 1.0.8 and 1.0.11). When I use version 1.0.7 the tab is there and everything works as expected.

Saving blocks does not work in SilverStripe 3.1.16

Goto some page, create a new Block and try to save it for the first time (no matter if you are saving a draft or directly publishing). This occurs when saving:

[Error] Couldn't run query: INSERT INTO "Block_versions" ("ClassName", "Title", "CanViewType", "LastEdited", "Created", "Name", "Header", "Content", "Link", "VideoURL", "Template", "Active", "ExtraCSSClasses", "Weight", "Area", "Published", "Version", "RecordID", "AuthorID") VALUES ('SmallBlock', 'MyTitle', 'Anyone', '2016-02-08 21:52:54', '2016-02-08 21:52:54', null, 'None', null, null, null, null, '1', null, '0', null, '0', 1, 11, 1) Unknown column 'Name' in 'field list'
/*path to site root*/framework/model/MySQLDatabase.php:598 

'SmallBlock' is my custom block class. Suddenly a Name column appears from somewhere, but it does not exist in the database, and as far I know, it also should not exist. As you can see, the above query is assigning null to that column anyway.

I'm very insecure about this issue as I don't know how to properly hunt it down and also don't have time to do it. I don't even know if this is a bug in this module at all, or if it's a bug in Versioned or in some other place in the framework.

In case it helps, here is the custom made SmallBlock class, but I don't think it relates to this bug:

class SmallBlock extends Block
{
    private static $singular_name = 'Pieni laatikko';
    private static $plural_name = 'Pienet laatikot';

    private static $db = array(
        'Content'   => 'HTMLText',
    );

    private static $has_one = array(
        'Image'     => 'Image',
    );
}

After upgrading to SilverStripe 3.2.* the bug was gone. So if no other solution is found, I think it would be good enough to update composer.json and require SS 3.2.*.

GridFieldManyRelationHandler requires the GridField to have a RelationList

I have created two of my own content blocks:

class MyContentBlock extends ContentBlock{
class TestimonialContentBlock extends MyContentBlock{

All worked fine and as expected. I then added a 3rd block

class SidebarContentBlock extends MyContentBlock{

Then when I went to add a CB in the model admin I get:

ERROR [User Warning]: GridFieldManyRelationHandler requires the GridField to have a RelationList. Got a UnsavedRelationList instead.
IN GET /admin/block-admin/Block/EditForm/field/Block/add-multi-class/TestimonialContentBlock

Please help - thanks!

Delete blocks

It doesn't seem to be possible to delete blocks, even from the Block Admin. Should this be added to the config at least?

Make blocks sortable by drag & drop on a per page basis (OrderableGridfield)

I think it makes sense to allow sorting blocks on a per page basis (within a BlockArea). Stretching this further, I think it's also worth considering if the BlockArea shouldn't also be on a many_many_extrafields field instead of the Block itself, to allow placement of the block on a per page basis as well (but that may be less of an issue).

I'm currently working on an implementation where I have drag & drop sorting working (quick hack status) by basing the sort on a many_many_extraFields on the Page-Blocks relation and drag & drop via OrderableGridfield. But would like to consult you on if you generally think this is a viable idea, and as well on how you'd think we can combine this with the 'blocks inherited from SiteConfig' and 'blocks from BlockSets'.

One possible direction would be to use a dropdown on Blocks in a Blockset and SiteConfig (again many_many_extrafields), to allow picking a position 'above' or 'below' page-specific blocks instead of weight. This would sacrifice a bit of the control on site-wide blocks in exchange for more fine-grained control on page-specific blocks. And exceptions can always be made by blocking inherited blocks on a page and re-adding them on a specific position. Would this work for your current implementations as well or do you have different use cases?

init() doesn't work on Block_Controller and subclasses

Goal: to be able to load in custom Requirements (JS and CSS) on a per-Block basis. With Widgets, this was accomplished by adding an init() function to the WidgetController. This method does not carry through to Blocks.

This may be related: when attempting to access {$URLSegment}/block/{$Block-ID}, a 500 error is generated with message:

Call to a member function getController() on a non-object in /var/www/blocks/code/extensions/BlockContentControllerExtension.php on line 32

Such an error does not occur with Widgets, which have a similar ContentController extension.

Inline editing of HTMLText etc.

@sheadawson, I've been using this module by @milkyway-multimedia for inline editing inside GridFields on a few occasions now. Thought I'd leave a quick note here; I think this would be a good addition to the Blocks module because it allows editors to edit a block's content in the context of the parent page. It supports inline HTMLEditor just fine (Uploadfield may need a little work).

image

BTW; we could also look into gridfieldextensions/GridFieldAddExistingSearchButton as it would allow editors to search existing blocks by more than just title/name.

Support for Theme-less sites

Hi Shea,

I recently stopped using the themes folder in SilverStripe development because I've only ever built one website where I actually needed it (a subsites website). I now put everything in the mysite folder which keeps all my custom code nicely contained in one folder.

I tried to use this module today for a site but I'm coming up a bit short - it looks like it won't work at all if you're not using the themes folder?

Can I suggest that this module allows some default/theme-independant settings which can then be overidden at the theme level? Could maybe look like this:

BlockManager:
  areas:
    Sidebar: false # default/theme-less setting
  themes:
    simple:
      areas:
        Sidebar: true # overridden for Simple theme

Add existing relies on $Title

Great work on the module Shea, a very useful addition to SS.

I have noticed that the "Add Existing" search window relies on $Title being present, otherwise it just shows a list of empty rows.

I understand the reason for removing the $Title field and replacing it with $Name, but it then makes it quite messy to have to add $Title to every subclass of Block and explain to CMS editors what the difference is. For now I am adding a getTitle() function to return $Name, but I imagine there is a better way to deal with this from within the module.

Unfortunately it doesn't look like the GridFieldAddExistingSearchButton allows you to specify the Label field which would have been the most obvious solution.

Aram

Per Block Editor Groups

Blocks can already define per-Block viewer permissions, but editing is a universal per-Member permission. Adding per-Block editor permission control would allow for more fine-grained control over Block content.

Misleading draft button state

Because of what we're used to when editing Pages in the CMS, when draft changes have been saved but not published on a block the button state makes it look like there are no draft changes.

silverstripe_-_blocks

Would be great if the appearance mirrored of that of a Page with unpublished changes:

silverstripe_-_edit_page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.