New (free) expand/collapse block
Post some feedback on my blog and send me your layouts. I'll then submit the block/package to the marketplace.. I'd just like to get some feedback and more layouts first!
Thanks Remo, excellent work. It is working well on one of my sites...
Just goes to prove my point about this fantastic growing community.
Good to see there are people still releasing free stuff :-)
When you look at my code you'll see that I had to use two different methods. getBlockObject is unfortunately not available when adding a new block.
$bt = BlockType::getByHandle('matogertel_area_splitter'); $templates = $bt->getBlockTypeCustomTemplates();
Wanted to use the API for all the stuff without using a hardcoded handle but I guess your code is better anyways (:
$bt = BlockType::getByHandle($this->btHandle); $templates = $bt->getBlockTypeCustomTemplates();
But it might be worth checking where it gets fetched.
Is there an easy way to expand/collapse all blocks on a page?
Also, do you know if search engines pick up content if it is collapsed by default?
The content is just hidden, but it's still there, even if it's collapsed. Search engines can easily see this content!
By the way: I created a google code project today where I'll manage the future development of this add-on. Don't expect any changes soon but it's not dead and I still have some ideas I want to implement.
Also, if someone wants to contribute on this add-on, drop me a message and I'll give you access to the subversion repository.
I tried to copy one instance of the block to my scrapbook and place another instance on the page and it didn't work. Instead, when trying to edit the new instance it disappears and leaves extra code hanging that you can't see or get rid of...
Is there a way to duplicate the block so that multiple instances may be created easily with the same formatting? What I might end up doing is just copying the contents of the block into the next block. I don't have a ton of settings to the block itself so maybe that won't be too difficult.
Edit: Putting more than one on the same page with default open seems to make it so you cannot close any of them...
Can you please try:
- To use the default theme to see if something in your theme causes the conflict
- Make sure you use the latest version found herehttp://code.google.com/p/concrete5-expand-collapse/...
I have version 1.0.1 so I think that's the latest, although I can't be positive.
I tried it on a new page and it seems to work fine without using the scrapbook, apart from the fact that using plus/minus and concrete5 versions at the same time messes up the formatting of the concrete5 button, which isn't really an issue because I wouldn't use both formats anyway.
Try this (I tested in default theme):
1. Add a regular expand block
2. Add another regular expand block
3. Copy the second expand block to the global scrapbook. Alias original.
4. Paste a third copy from the global scrapbook. It disappears.
5. Click on the second copy again and paste it to admin scrapbook instead.
6. Add another copy from admin scrapbook.
7. Publish page. The third copy again disappears.
I ended up doing something different, so if no one else has this issue maybe it isn't worth your time. If you want me to continue working on this to locate the problem for you I'm happy to try.
I also tried it on a different C5 installation and theme and it did the same thing.
Check this page:http://www.concrete5.org/documentation/general-topics/scrapbooks/...
NOTE: Because you're aliasing the original block, if you try to place the same block many times in the same page only the first one will actually stay when you save your changes. This is admittedly annoying problem if you've got a block that needs to be repeated inside the same page a lot. It's just the product of the way this feature has matured and not a brilliant plan you don't understand. Best advice, use the personal scrapbook for this type of problem where every block you make is a new instance.
Is there a way to have the content slide upwards instead of down? I don't want to break the content. I looked at the view.php file and played around with that, but I'm hoping there's a solution where I can just move the DIVs around.
*EDIT* figured it out:
echo '<div id="ccm-remo-expand-content-'.$bID.'" class="ccm-remo-expand-content"'.$contentCss.'>'; $content = $controller->getContent(); echo $content; echo '</div>'; echo '<a href="" id="ccm-remo-expand-title-'.$bID.'" class="ccm-remo-expand-title '.$className.'"><span class="ccm-background"><span class="ccm-icon">' . $controller->title . '</span></span></a>';
I would like to have had this inside the blog and update the top ten each day - then push it to the homepage each day, but that's not possible.
Do i need to get a custom build to make that happen?
I'd check the marketplace but you quite likely have to build something on your own! You don't have to create a completely new add-on, a template for the page list block might work as well.
If you look at this code from Kino you'll get a good impression about it:
I recently upgraded for new version on C5 and permissions got really messed up.
It also deactivated the following Add Ons:
'Advanced Guestbook Comment' is not working, 'Simple Blog Post' is not working, 'Popup Menu' is not working.
Please see attachment.
Thank you in advance!!
Do you mean that only permissions on expand blocks are messed up?