Currently, in D8 Page Manager you can override the node or user path, but there aren't blocks available for placing the fields!

In CTools, we should use derivatives to create a block for every field which takes it's entity as context. This should be enough for this to work in Page Manager!

Remaining tasks

  1. Determine if we need to implement ::blockAccess()
  2. Move to a new 'ctools_block' module per discussion we had about this issue in a SCOTCH meeting a while back
  3. Add config schema
  4. Check if we're getting the render cache info correct
  5. Write tests for common fields (body, image, taxonomy, etc)
CommentFileSizeAuthor
#61 2561935-61.interdiff.txt912 byteseclipsegc
#61 2561935-61.patch26.34 KBeclipsegc
#59 2561935-59.interdiff.txt747 byteseclipsegc
#59 2561935-59.patch26.35 KBeclipsegc
#57 2561935-57.interdiff.txt3.65 KBeclipsegc
#57 2561935-57.patch26.39 KBeclipsegc
#52 interdiff.txt11.64 KBdsnopek
#52 ctools-entity-field-block-2561935-52.patch26.09 KBdsnopek
#51 ctools-entity-field-block-2561935-51.patch29.13 KBdsnopek
#49 interdiff-2561935-46-49.txt902 bytesphenaproxima
#49 2561935-49.patch28.17 KBphenaproxima
#46 interdiff.txt1.13 KBdsnopek
#46 ctools-entity-field-block-2561935-46.patch27.9 KBdsnopek
#44 interdiff.txt7.57 KBtim.plunkett
#44 2561935-ctools_block-43-PASS.patch28.75 KBtim.plunkett
#44 2561935-ctools_block-43-FAIL.patch27.86 KBtim.plunkett
#40 interdiff-2561935-39-40.txt3.82 KBphenaproxima
#40 2561935-40.patch27.68 KBphenaproxima
#39 interdiff.txt2.37 KBdsnopek
#39 ctools-entity-field-block-2561935-39.patch26.19 KBdsnopek
#38 interdiff.txt11.9 KBdsnopek
#38 ctools-entity-field-block-2561935-38.patch26.45 KBdsnopek
#37 ctools-entity-field-block-2561935-37.patch14.92 KBdsnopek
#36 interdiff.txt2.28 KBdsnopek
#36 ctools-entity-field-block-2561935-36.patch14.33 KBdsnopek
#35 interdiff.txt6.3 KBdsnopek
#35 ctools-entity-field-block-2561935-35.patch14.07 KBdsnopek
#34 interdiff.txt1.68 KBdsnopek
#34 ctools-entity-field-block-2561935-34.patch12.89 KBdsnopek
#30 Screenshot 2015-10-28 15.45.13.png179.11 KBtedbow
#24 interdiff.txt8.3 KBdsnopek
#24 ctools-entity-field-block-2561935-24.patch12.91 KBdsnopek
#22 ctools-entity-field-block-2561935-22.patch12.79 KBdsnopek
#21 interdiff.txt1.67 KBdsnopek
#21 ctools-entity-field-block-2561935-21.patch13.07 KBdsnopek
#20 interdiff.txt1.29 KBdsnopek
#14 ctools-entity-field-block-2561935-14.patch13.93 KBdsnopek
#10 interdiff.txt1.72 KBdsnopek
#10 ctools-entity-field-block-2561935-9.patch14.01 KBdsnopek
#8 interdiff.txt7.71 KBdsnopek
#8 ctools-entity-field-block-2561935-8.patch14.01 KBdsnopek
#7 interdiff.txt5.36 KBdsnopek
#7 ctools-entity-field-block-2561935-7.patch9.69 KBdsnopek
#6 interdiff.txt5.17 KBdsnopek
#6 ctools-entity-field-block-2561935-6.patch8.58 KBdsnopek
#5 interdiff.txt4.08 KBdsnopek
#5 ctools-entity-field-block-2561935-5.patch7.05 KBdsnopek
#4 ctools-entity-field-block-2561935-4.patch6.46 KBdsnopek

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Title: Create a block for every field that takes the entity as context » Create a block for every field (which'll take the entity as context)

Make title a little clearer.

dsnopek’s picture

Assigned: Unassigned » dsnopek

I've started working on this!

dsnopek’s picture

Status: Active » Needs work
StatusFileSize
new6.46 KB

Here's a first pass at this! It needs to do all the field configuration stuff, and generate better admin labels for the blocks, but it does render fields! :-)

dsnopek’s picture

StatusFileSize
new7.05 KB
new4.08 KB

I fiddled with this a bit during the in-between times today. All it does is include better category and block labels.

dsnopek’s picture

StatusFileSize
new8.58 KB
new5.17 KB

And once you start, it's hard to stop. :-) Here's a patch which starts to figure out information about available field formatters. Ok, time to go to bed!

dsnopek’s picture

StatusFileSize
new9.69 KB
new5.36 KB

This has it storing and using the formatter options that apply to all formatters. Still haven't gotten the actual formatter settings form loading via AJAX yet.

dsnopek’s picture

Assigned: dsnopek » Unassigned
Status: Needs work » Needs review
StatusFileSize
new14.01 KB
new7.71 KB

Alright! This finally loads the formatter settings form via AJAX and allows those values to be saved and used. It also sets a label for the entity context and makes it required. I think this is ready for wider review!

Status: Needs review » Needs work

The last submitted patch, 8: ctools-entity-field-block-2561935-8.patch, failed testing.

dsnopek’s picture

Status: Needs work » Needs review
StatusFileSize
new14.01 KB
new1.72 KB

I read through the patch and found some little things to clean up. I promise I won't touch this anymore until someone else can review it. :-)

dsnopek’s picture

Those test failures were wizard failures. Probably something that needs to be updated for latest HEAD - I'd guess connected with the "Dynamic Page Cache" changes.

Status: Needs review » Needs work

The last submitted patch, 10: ctools-entity-field-block-2561935-9.patch, failed testing.

dsnopek’s picture

Status: Needs work » Needs review
dsnopek’s picture

StatusFileSize
new13.93 KB

Blergh! My interdiff from before was correct, but the main patch was the same as the last one. This one should be correct.

Status: Needs review » Needs work

The last submitted patch, 14: ctools-entity-field-block-2561935-14.patch, failed testing.

dsnopek’s picture

Status: Needs work » Needs review

Stupid wizard tests! Marking as NR - hopefully for the last time today. :-)

dsnopek’s picture

Here's an issue to fix the wizard tests #2573413: Fix wizard tests

dsnopek’s picture

Status: Needs review » Needs work

Chatted with EclipseGC about this on IRC. He told me it's possible to add constraints to the context definition for the entity bundle, so that the block won't be available for entity bundles that don't have the given field. What he didn't know is if you can put multiple constraints for the same value.

Here's some example code from src/Plugin/Condition/NodeType.php:

    if (count($this->configuration['bundles']) == 1) {
      $bundle = array_values($this->configuration['bundles']);
      foreach ($this->getContextMapping() as $definition_id => $context_id) {
        $contexts[$context_id]->getContextDefinition()->addConstraint('Bundle', ['value' => $bundle[0]]);
      }
    }

We'll need to some code that calls ->addConstraints() in the deriver.

dsnopek’s picture

So, the BundleConstraint can take multiple bundles (in fact, it converts the string to an array). But setting this constraint makes it so that Page Manager won't list the blocks as an option to add when overriding the node/% path.

This is from this code in ContextHandler::getMatchingContexts():

      // If any constraint does not match, this context is invalid.
      foreach ($definition->getConstraints() as $constraint_name => $constraint) {
        if ($context_definition->getConstraint($constraint_name) != $constraint) {
          return FALSE;
        }
      }

Basically, since the contexts from Page Manager don't have the same constraints, it decides that the context is not available, and doesn't return the block as an option. But Page Manager can't add constraints about the bundle, because in the admin UI, it still doesn't know the specific entity.

So, I'm not sure we can add this to the context definition...

dsnopek’s picture

StatusFileSize
new1.29 KB

Here's the change to this patch that would add the bundle constraint mentioned in #19 just for reference

dsnopek’s picture

Status: Needs work » Needs review
StatusFileSize
new13.07 KB
new1.67 KB

Here's a new version of this patch which has the deriver descend from EntityDeriverBase.

Since the "bundle constraint thing" (from #18, #19 and #20) ended up not being workable (although, not having the constraint doesn't hurt anything as far as I can tell) I think this now addresses all the informal review from EclipseGC in IRC! So, setting back to Needs Review.

dsnopek’s picture

StatusFileSize
new12.79 KB

Bah! This is a Git failure on my part, but my last patch in #21 accidentally included the "bundle constraint thing" change which is represented in the interdiff in #20. Here's what the patch should have been. The interdiff from #21 is still correct. Sorry for the confusion!

tim.plunkett’s picture

  1. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    +  protected function getFieldDefinition() {
    

    Can you put all of these getters at the bottom of the class? Just for readability's sake.

  2. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    +    $config = $this->getConfiguration();
    +    $config['formatter']['label'] = $form_state->getValue('formatter_label');
    +    $config['formatter']['type'] = $form_state->getValue('formatter_type');
    +    $config['formatter']['settings'] = $form_state->getValue('formatter_settings');
    +    $this->setConfiguration($config);
    

    I think it's fine to just do $this->configuration['formatter']['label'] = ... here, BlockBase::setConfiguration() does nested merges, which we don't need.

  3. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    +  public function build() {
    

    This should be the first method after __construct/create, IMO

  4. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    +    /** @var $entity \Drupal\Core\Entity\EntityInterface */
    ...
    +    if ($field = $entity->{$this->fieldName}) {
    

    I think this should be

    if ($entity instanceof FieldableEntityInterface && $entity->hasField($this->fieldName)) {
    
dsnopek’s picture

StatusFileSize
new12.91 KB
new8.3 KB

Alight! Here's a new patch that addresses all of Tim's points in #23. The interdiff is super messy because code is moved around, but it is what it is.

jonhattan’s picture

  1. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    + * Provides a block to view a specific entity.
    

    ...entity field.

  2. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    +  /**
    +   * The formatter manager.
    +   *
    +   * @var \Drupal\Core\Field\FieldTypePluginManagerInterface
    +   */
    +  protected $fieldTypeManager;
    

    Wrong doctring.

  3. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    +    list ($plugin_base_id, $entity_type_id, $field_name) = explode(':', $plugin_id);
    

    If $plugin_base_id is not to be used, this also does the job list(,$entity_type_id,$field_name) = ... I think it is clearer.

  4. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    +  public function defaultConfiguration() {
    +    $field_type_definition = $this->getFieldTypeDefinition();
    +    return [
    +      'formatter' => [
    +        'label' => 'above',
    +        'type' => $field_type_definition['default_formatter'] ?: '',
    +        'settings' => [],
    +        'third_party_settings' => [],
    +        'weight' => 0.0,
    +      ],
    +    ];
    +  }
    

    This is the same array as the one returned by $this->entity->getComponent($field_name); (used in buildFieldRow()). See below.

  5. +++ b/src/Plugin/Block/EntityField.php
    @@ -0,0 +1,323 @@
    +  public function blockForm($form, FormStateInterface $form_state) {
    +    $config = $this->getConfiguration();
    +
    +    $form['formatter_label'] = [
    +      '#type' => 'select',
    +      '#title' => $this->t('Label'),
    +      '#options' => [
    

    I wonder if we can leverage
    EntityViewDisplayEditForm::buildFieldRow() here instead of building a very similar form.

  6. +++ b/src/Plugin/Deriver/EntityFieldDeriver.php
    @@ -0,0 +1,54 @@
    + * Provides entity view block definitions for each entity type.
    

    entity field again.

tedbow’s picture

I just found this issue. I was helping Field as Block module basically do this.

#2513246: New approach for fields as block

I created an issue on that module to let them know this might be included in CTools
#2603044: Similar functionality will be included in CTools

dsnopek’s picture

@tedbow: Thanks! I didn't know there was a whole project for that...

In any case, CTools will definitely do this (it did it in D7 too, we just didn't use core blocks in D7), it's just a question of nailing down the implementation. Also, we see CTools as an incubator for core, so it's possible we'll propose this for inclusion in core in a point release (like 8.1, 8.2, 8.3, etc..).

dsnopek’s picture

Status: Needs review » Needs work

Just a note to self: Do we need to specifically implement ::blockAccess()? Marking as "Needs work" to figure that out and to address the review in #25.

dsnopek’s picture

Issue tags: +D8panels, +Needs tests
tedbow’s picture

StatusFileSize
new179.11 KB

One side effect of this change is the "Place Block" modal on the core blocks page becomes overwhelming with all of the Blocks this adds.

As you can see in this screenshoot most of the first screen is taken up my "Content Field" blocks. If I scroll there is another page of this. And then there are a bunch of user ones at the end. And this is just on a test site where I haven't actually added any fields through the Field UI. I also don't any contrib modules that define their own entity types.

I know there is now a search box but I think it will be overwhelming for a lot of new site builders and might lead them to think "Place Block" is mainly just for fields.

Since CTools is likely to become effectively required for most Drupal 8 sites(because it so useful and many modules will depend on it) then I think there should be some consideration for how these changes will affect sites that aren't using Page Manager/Panels.

Right now I see that CTools has no submodules. Is that the plan for Drupal 8 or would it make sense to have some functionality like this that would be sub-modules that modules like Panels could require(or suggest is that possible in D8?) but that not every site would have to automatically turned on just because they have a module that depends on CTools.

Anyways I feel like I am rambling but thought I would put this out there for feedback.

dsnopek’s picture

The plan is also for CTools to include improvements to the core block UI, because there are several problems (not just this one) once contrib starts including more blocks and conditions. For example, enabling the Rules module totally breaks the core block UI too.

Tomorrow I'll start making some new issues for the UI improvements! I was hoping to get this one in first and work on the UI stuff second (because CTools is still in -alpha), but I'd be fine with doing it the other way around if necessary. :-)

tedbow’s picture

@dsnopek,
Re:

The plan is also for CTools to include improvements to the core block UI,

Ok cool I didn't know that.

but I'd be fine with doing it the other way around if necessary. :-)

No need to on my account ;). Looking forward to see what the UI improvements are.

dsnopek’s picture

I created a meta issue for improvements to the core block UI:

#2604162: [meta] Improvements to core block UI

It's got the 3 issues we've discussed in the past, but this is the one that applies to this situation:

#2604178: Modify core block UI to seperate blocks into categories with tabs

dsnopek’s picture

Component: Code » CTools Blocks
Status: Needs work » Needs review
StatusFileSize
new12.89 KB
new1.68 KB

Here's a new patch to address the review from #25! Thanks!

Regarding points #4 and 5: I really don't know how we'd reuse code from Views, and actually, even if I knew how I'm not sure it'd be a good idea coupling this to Views code since this functionality doesn't depend on views.

Still TODO:

  1. Determine if we need to implement ::blockAccess()
  2. Check if we're getting the render cache info correct
  3. Move to a new 'ctools_block' module per discussion we had about this issue in a SCOTCH meeting a while back
dsnopek’s picture

Issue summary: View changes
StatusFileSize
new14.07 KB
new6.3 KB

This patch should finally handle access correctly! It also switches away from the deprecated EntityManagerInterface and uses the two services it actually needs.

Also, I moved my remaining tasks up into the issue summary.

dsnopek’s picture

StatusFileSize
new14.33 KB
new2.28 KB

Actually, we can access the entity context from ::blockAccess() so we don't need to check twice!

dsnopek’s picture

Issue summary: View changes
StatusFileSize
new14.92 KB

Here's a patch that moves this code into a new ctools_block module, with no other functional changes. I'm not including an interdiff because it's just moving code.

dsnopek’s picture

StatusFileSize
new26.45 KB
new11.9 KB

Here is a patch that adds the boilerplate for writing the tests, but none of the actual tests. I put some @todo's in the EntityFieldBlockTest for the sort of tests we need to write. All of them are hardcoded to fail for now!

dsnopek’s picture

StatusFileSize
new26.19 KB
new2.37 KB

Ok, apparently what I did in #36 is wrong, because we don't actually have access to the entity from context in ::blockAccess(). Sorry, @phenaproxima!

phenaproxima’s picture

Issue tags: -Needs tests
StatusFileSize
new27.68 KB
new3.82 KB

Behold, for I have written tests.

Let it be known that the render cache test does not pass; but according to @dsnopek this is unsurprising. I'd fix it myself but I don't know enough about the render pipeline to make short work of it.

jonhattan’s picture

re #34. @dsnopek points 4,5 in #25 are not about views, but field_ui module.

tim.plunkett’s picture

Hmm, what made you come to that conclusion in #39?
a) blockAccess should ABSOLUTELY have access to the entity context.
b) It does, in my testing.

diff --git a/src/Plugin/Block/EntityView.php b/src/Plugin/Block/EntityView.php
index 04b31d1..0e361b6 100644
--- a/src/Plugin/Block/EntityView.php
+++ b/src/Plugin/Block/EntityView.php
@@ -12,6 +12,7 @@
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Plugin\ContextAwarePluginInterface;
+use Drupal\Core\Session\AccountInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -100,4 +101,11 @@ public function build() {
     return $view_builder->view($entity, $this->configuration['view_mode']);
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function blockAccess(AccountInterface $account) {
+    $entity = $this->getContextValue('entity');
+    return parent::blockAccess($account);
+  }
 }

I made this change to ctools, and put a breakpoint in blockAccess and $entity was fully populated.

dsnopek’s picture

Assigned: Unassigned » dsnopek
Issue summary: View changes

Re #42: EclipseGC, phenaproxima and I were getting a fatal error that was fixed by making the change in #39. I'll dig into this now and see if I can't get to the bottom of why that works for you and not us, and why get a fatal for stuff that is working for us. :-)

Also, I added a TODO to the issue summary about the config schema so we don't forget about that!

tim.plunkett’s picture

StatusFileSize
new27.86 KB
new28.75 KB
new7.57 KB

Okay I misunderstood and was testing via the Page Manager UI.

This patch is on top of #40.

dsnopek’s picture

Thanks, Tim! The config schema stuff is hard, even without two core bugs. :-) Unfortunately, I don't think testbot will run our tests because ctools_block is a new module added in this patch, so the TEST/FAIL patches won't do their thing. :-/

@jonhattan: re #41 - ah, ok, sorry, I misunderstood! I'll look into it!

dsnopek’s picture

Issue summary: View changes
StatusFileSize
new27.9 KB
new1.13 KB

This gets the render cache tests passing! It also shows what needs to be changed to fix #2631120: "Entity view" block showing first entity rendered on all pages . However, I think one part of the test isn't really testing anything:

+++ b/modules/ctools_block/src/Tests/EntityFieldBlockTest.php
@@ -0,0 +1,105 @@
+    $text = 'This is my text. Are you not entertained?';
+    $a->body->value = $text;
+    $a->save();
+    $this->drupalGet('node/' . $a->id());
+    $this->assertText($text);

Since the body is displayed on the node view page anyway, it'll always find it here. We need to look specifically at the block somehow (or use a different field that isn't displayed on the node view page).

On the other tests too, I think we should test not just that the block label is there, but that the contents look right. We could use a similar or the same approach for that.

dsnopek’s picture

Assigned: dsnopek » Unassigned

Unassigning for now...

phenaproxima’s picture

Since the body is displayed on the node view page anyway, it'll always find it here. We need to look specifically at the block somehow (or use a different field that isn't displayed on the node view page).

At the beginning of that test method, the body component is specifically removed from the entity view display in order to ensure that the test is meaningful. :)

phenaproxima’s picture

StatusFileSize
new28.17 KB
new902 bytes

Fixed a fatal error caused by a missing sanity check in EntityFieldDeriver.

Status: Needs review » Needs work

The last submitted patch, 49: 2561935-49.patch, failed testing.

dsnopek’s picture

Status: Needs work » Needs review
StatusFileSize
new29.13 KB

Blergh! Tests are failing because my last patch (which phenaproxima's is based on) is missing Tim's config schema. :-/ Here's a patch that adds it back. At least testbot is running the tests for ctools_block now. :-)

re #48:

At the beginning of that test method, the body component is specifically removed from the entity view display in order to ensure that the test is meaningful. :)

Aah, sorry, I missed that. Actually, since we're creating a special content type for this and providing the config for the display, maybe we should just always hide all the fields from normal display?

I'll do something like this is in the next patch!

dsnopek’s picture

StatusFileSize
new26.09 KB
new11.64 KB

Alright! This patch removes the fields from normal display in the config bundled with the tests, so if we see the content, we're sure it's from the block. So, I added tests for the actual content where that made sense. Since we aren't actually uploading an image, this made the image field test kinda useless, so I removed that for now (rather than spend time figuring out how to do that - let's just get this patch committed!).

As far as I'm concerned this is ready enough to be merged - we can address anything else in follow-ups.

chx’s picture

What I do not readily understand is -- why a separate block for each field? Why not one block per entity type with the field name as a setting?

tedbow’s picture

I also wondered about @chx question. See my comment and screenshot in #30 about how many blocks this produces and how it seems to take over the block add page.

@dsnopek did mention some UI improvements that would make the that situation better. I didn't follow up about that.

dpi’s picture

#53

What I do not readily understand is -- why a separate block for each field? Why not one block per entity type with the field name as a setting?

Field as Block is a shining example of how it should be done.

dsnopek’s picture

@chx: I think the main reason is this is how we did it in Drupal 7, and we're working (slowly) towards replicating the experience in Panopoly where you have the blocks divided clearly by category.

That user experience works really well for us, where users drill down in conceptual areas. For example, first they say, "I want to put something with users, so they click 'User'" and get a list of those blocks, which includes both fields and other user-y things, without the user really needing to know the difference between say a "field" and a "view" that takes a user context - they just know they want things that come from users. If they had to select a "User field" or "Entity field" block and then configure it, it requires them to know Drupal-y things like what a field and an entity are.

@tedbow: the issue to replace the current block selection UI, with an experience more like D7 Panopoly is #2604178: Modify core block UI to seperate blocks into categories with tabs

eclipsegc’s picture

StatusFileSize
new26.39 KB
new3.65 KB

Ok, added a number of changes to the code base that make access more reliable and remove those same checks in the build process (since they're no longer needed there). Also updated the caching process to be more inline with contextual plugins, and removed the block dependency. I am also, after having worked with this, completely unconvinced of a need for a separate module for this block. Core's block UI has a search feature for finding the block you want anyway, which works quite nicely even in the presence of this patch. I'm version heavily leaning toward removing the module and just adding the block to ctools directly.

Eclipse

Status: Needs review » Needs work

The last submitted patch, 57: 2561935-57.patch, failed testing.

eclipsegc’s picture

Status: Needs work » Needs review
StatusFileSize
new26.35 KB
new747 bytes

This should get tests passing.

Eclipse

dsnopek’s picture

For the most part these changes look great! As far as I'm concerned this is RTBC, but I'm too close to this patch to do the honors. :-)

One minor thing (that you can feel free to ignore):

+++ b/modules/ctools_block/src/Plugin/Block/EntityField.php
@@ -138,25 +139,16 @@ class EntityField extends BlockBase implements ContextAwarePluginInterface, Cont
+    // Set the cache data appropriately.
+    $build['#cache']['contexts'] = $this->getCacheContexts();
+    $build['#cache']['tags'] = $this->getCacheTags();
+    $build['#cache']['max-age'] = $this->getCacheMaxAge();

This is cool! However, it kind of sucks having to set each of those #cache values independently.

What if we implement CacheableDependencyInterface (we're already implementing it's methods) and then did something like:

CacheableMetadata::createFromObject($this)->applyTo($build);

That should be sufficient and it's friendlier to read.

That said, it's probably slightly slower and really doesn't matter. :-)

eclipsegc’s picture

StatusFileSize
new26.34 KB
new912 bytes

Very minor addition in this patch.

In general I'm happy with what's here, however I'm not happy with putting it in ctools_block. I want it in ctools directly. To that end, I'm going to timebox an effort on #2604178: Modify core block UI to seperate blocks into categories with tabs and see if I can't get something committed to ctools that makes browsing blocks nicer and easier.

Eclipse

  • EclipseGc committed 25a83a2 on 8.x-3.x
    Issue #2561935 by dsnopek, EclipseGc, phenaproxima, tim.plunkett: Create...
eclipsegc’s picture

Status: Needs review » Fixed

Committed and pushed.

#2604178: Modify core block UI to seperate blocks into categories with tabs Proved larger than I was hoping (but not larger than I expected). To that end this has been committed now. I have every intention of moving it OUT of ctools_block and using that module for something other than just wrapping this. I'm hoping that we'll have some time between the latest release and our next release and that we can solving this before an alpha containing this code is out.

dsnopek’s picture

Woohoo! Thanks. :-) I somehow missed this yesterday..

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jmev’s picture

Sorry, but I'm a bit unsure how to use this. I've applied the patch and there are still no fields showing up in the page manager when I try to add blocks. Can you tell me what I am missing?

Thanks.

miiimooo’s picture

@jmev (You've probably worked this out by now) you have to enable the Chaos tools block module too (ctools_blocks) - no need to apply a patch this is the current version (8.3.0-alpha24) and works freshly installed with page manager (8.1.0-alpha23), panels (8.3.0-beta4) and layout plugin (8.1.0-alpha22)

netsliver’s picture

Hi,

I have a field in taxonomy, it doesn't appear on blocks list.

Someone managed to use it with fields on the terms?

Regards