Custom Blocks in 5.5.1
Permalink 1 user found helpful
Has something changed with 5.5.1 for creating new block types?
I created 2 custom block types on a previous site I did in version 5.4.2.
Now when I place them in the /blocks folder and go to 'Add Functionality' it does not list anything under 'Awaiting Installation'.
Thank you in advance for anyone who can point me in the right direction.
I created 2 custom block types on a previous site I did in version 5.4.2.
Now when I place them in the /blocks folder and go to 'Add Functionality' it does not list anything under 'Awaiting Installation'.
Thank you in advance for anyone who can point me in the right direction.
Well I converted my blocks into a package and that seemed to work. I wonder if that is how all block types are to be installed.
Personally, I may start playing with a block idea in a custom block, but I nearly always end up putting it into a package simply because it is easier to maintain, even if it is just for use on one specific site.
JTF,
Out of curiosity (and equal parts ignorance and stupidity), what's "easier to maintain" about a package versus a custom block? Having never created a package of my own, I'm asking from a pretty ignorant spot... but I'm curious (and learning).
Thanks!
- John (the nonFish, LOL!)
Out of curiosity (and equal parts ignorance and stupidity), what's "easier to maintain" about a package versus a custom block? Having never created a package of my own, I'm asking from a pretty ignorant spot... but I'm curious (and learning).
Thanks!
- John (the nonFish, LOL!)
The main things I like about packages (even one off)
- Version controlled updates
- I can control what installs
- I can move a package about from one site to another as a single directory with all the files within the package
- Great for secondary database tables, libraries, models, tools etc, all as part of the same package
- Access to more events
- Uninstalls as a single item
- Version controlled updates
- I can control what installs
- I can move a package about from one site to another as a single directory with all the files within the package
- Great for secondary database tables, libraries, models, tools etc, all as part of the same package
- Access to more events
- Uninstalls as a single item
I was just having exactly this problem. I will try my hand at repackaging the block as a package. Hoping this isn't that big a deal (?), having never made a package before...
Although there are some good howtos, I have found the best way to learn is to pick a straightforward packaged block that is free on the marketplace and have a look inside it.
Use it to learn, but be careful about just copying. Even free blocks are subject to copyright.
Use it to learn, but be careful about just copying. Even free blocks are subject to copyright.
In 5.5, you install custom blocks from the "Block Types" dashboard page, not the "Add Functionality" page. Yeah, this is really annoying, and I hope it gets fixed in the future.
All that stuff about packages is good and well, but really a package is overkill if you're just building a custom block for one site and you don't need to re-use it on other sites.
All that stuff about packages is good and well, but really a package is overkill if you're just building a custom block for one site and you don't need to re-use it on other sites.
Thanks jordanlev!
Lifesaver
This really needs to be added to the Docs at :
http://www.concrete5.org/documentation/developers/blocks/understand...
Lifesaver
This really needs to be added to the Docs at :
http://www.concrete5.org/documentation/developers/blocks/understand...
Hi russellfeeed,
Thanks for catching that. I've updated the instructions on that page to use the concrete5.5 and greater way of installing custom blocks in the Dashboard.
Thanks for catching that. I've updated the instructions on that page to use the concrete5.5 and greater way of installing custom blocks in the Dashboard.
Jordan's right. This was changed intentionally to simplify the code in the Add Functionality page. You install block types from the Block Types page instead of the Add Functionality page in 5.5. All the same functionality is available in 5.5. You don't have to create a package if all you need to do is install a custom block type.
Complicating the UI to make lives easier for developers strikes me as a very un-concrete5 thing to do...
this seems to me to be the root cause of a lot of the 5.5 dashboard things that are bothering people: it simplifies the code and makes everything more modular, but is not as good of a user experience.
I hope you and the team will consider re-visiting some of these UI polish things in the future... they're really important (especially to new users coming to the system).
this seems to me to be the root cause of a lot of the 5.5 dashboard things that are bothering people: it simplifies the code and makes everything more modular, but is not as good of a user experience.
I hope you and the team will consider re-visiting some of these UI polish things in the future... they're really important (especially to new users coming to the system).
To me, it seems like keeping all block-specific items on one page makes more sense, especially in light of the fact that we've included all blocks on the page that come from packages now (since we're incorporating your block ordering stuff in the subsequent version.)
As it stands, you add packages from the install page. You used to install blocks from the install page but all other individual extensions (like attribute types, automated jobs, mail importers, languages, shipping types and payment types in eCommerce) are actually installed from within the section that they apply to. If you look at it that way, blocks have always been the outlier, and moving them into the Block Types section makes more sense than vice versa.
As it stands, you add packages from the install page. You used to install blocks from the install page but all other individual extensions (like attribute types, automated jobs, mail importers, languages, shipping types and payment types in eCommerce) are actually installed from within the section that they apply to. If you look at it that way, blocks have always been the outlier, and moving them into the Block Types section makes more sense than vice versa.
I see your point, that does make sense. But I have seen a bit of confusion in the forums about this issue so I think that despite the intentions, it's not clear to people. I wonder if adding a link to the block types dashboard page from the "add functionality" page would be helpful?
How about just adding a link to the blocks page from the dropdown of the install page etc.
EDIT - Just realised I have repeated what Jordan said. So count the above as a +1 vote
EDIT - Just realised I have repeated what Jordan said. So count the above as a +1 vote