In order to run these CLI commands, open a terminal console and make the concrete5 webroot folder the current directory (eg. the one that contains the index.php file); making that folder the current directory is not mandatory, but it's useful for people that read this document only partially.
Read more about CLI commands here: https://documentation.concrete5.org/developers/appendix/cli-commands
Now, let’s start with a very simple command:
This will call the “block-developer” command and pass a Block Type Handle (-b) of “hello_block_developer”. If your environment allows interactive mode, you’ll be asked the following question:
Do you want to place this Block Type within an already installed Package [y/N]
You can answer that with yes if you’d want, but for this example we will choose no (just type “n”) and hit enter. After hitting enter, you will get another question:
Enter your desired Block Name [Hello Block Developer]
So you can see, the handle you passed will be translated to a name at the end between []. In case you do not like that name, enter a name you’d like for this Block Type. If you’re OK with it, just don’t enter anything and press enter. Upon doing so, you will get a bunch of messages saying what is being done for you. It would look something like this:
As you can see, the terminal lets you know all tasks are completed. A Block Type has been created and installed, so you can already add it somewhere on a page if you'd like to. Congratulations! Easy, right?
Use, by you or one client, in a single end product. The total price includes the item price and a buyer fee.
Use, by you or a client, in 5 single end products. The total price includes the item price and a buyer fee.
Use, by you or a client, in x/xx single end products.
Upon request, quote will be made and sent to you via email.
Got something to say? Need help?
View support forum