How To Implement Simple Custom Block

I am using version 4.14 Multivendor

I am attempting to develop a simple custom block so that I can add it to a Layout. However, I am having difficulty seeing the Block as an option when I go to

Design -> Layouts > choose a layout page -> Choose any Grid to add the block to -> Create New Block

I don't see the block I have developed show up as an optoin.

Here is what I have done to try to get it to work.

1) Add an addon

Under app/addons/cl_vendor_askaquestion/addon.xml

I added the following

cl_vendor_askaquestion
1.0
100500
en
Then under app/addons/cl_vendor_askaquestion/schemas/block_manager
I added the file
blocks.post.php
With the contents of this file, I was attempting to create the most simple block with template definition.
$schema['cl_vendor_askaquestion'] = array (
'templates' => array(
'addons/cl_vendor_askaquestion/cl_block_vendor_askaquestion.tpl' => array(),
),
'wrappers' => 'blocks/wrappers',
);
return $schema;
Then under design/themes/responsive/templates/addons/cl_vendor_askaquestion/cl_block_vendor_askaquestion.tpl
The contents of this file is
{** block-description:cl_block_vendor_askaquestion **}
Test block cl askaquestion

I have also added a .po file for the add-on so that the block would have a name. Here are the contents of it

msgid ""
msgstr "Project-Id-Version: tygh\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: English\n"
"Language: en_US"
msgctxt "Addons::name::cl_vendor_askaquestion"
msgid "CL Vendor Ask A Question Addon"
msgstr "CL Vendor Ask A Question Addon"
msgctxt "Addons::description::cl_vendor_askaquestion"
msgid "Adds the Ask a Question to Vendor separately"
msgstr "Adds the Ask a Question to Vendor separately Test"
msgctxt "Languages::block_cl_block_vendor_askaquestion"
msgid "CL Vendor Ask"
msgstr "CL Vendor Ask"
msgctxt "Languages::cl_block_vendor_askaquestion"
msgid "CL Vendor Ask A Question"
msgstr "CL Vendor Ask A Question"

To test this,

I INSTALL my Add-On and ACTIVATE it.

I am browsing to Design -> Layouts > choose a layout page -> Choose any Grid to add the block to -> Create New Block. I do not see my block

I am using a child theme of responsive, but I tried moving the code to it and it still did not work.

I have cleared the cache both before and after installation.

I have made certain that the file permissions are correct for the files to be read on the server.

How might I know if it is even reading the .tpl file or the block definition? It doesn't seem that it is because the .tpl file doesn't exist in the cache.

Thank you in advance for your help.

Before

return $schema;

add

fn_print_r('test');

then clear cache and go to Design -> Layouts. Do you see debug information at the top of the page?

Thank you for your reply.

I added fn_print_r('test'); to my code at

addons/cl_vendor_askaquestion/schemas/block_manager/block.post.php

And I DO NOT see that this is shown at the top of the page of Design -> Layouts.

Thank you for the advice. I had not namesd my file blocks.post.php. I named it block.post.php and it wasn't reading the schema. I am on the right path now.

Thank you for the advice. I had not namesd my file blocks.post.php. I named it block.post.php and it wasn't reading the schema. I am on the right path now.

Thank you for letting us know it