New (free) expand/collapse block
Permalink
After all the funny discussions about paid addons. Here's another free block:
http://www.codeblog.ch/2009/10/expandcollapse-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!
http://www.codeblog.ch/2009/10/expandcollapse-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!
i'll check it out. :)
http://www.annejones1.com/curriculum
Thanks Remo, excellent work. It is working well on one of my sites...
Just goes to prove my point about this fantastic growing community.
Cheers
Sean
Thanks Remo, excellent work. It is working well on one of my sites...
Just goes to prove my point about this fantastic growing community.
Cheers
Sean
Hi Remo, funny I'm working on the new Area Splitter and the first thing I did yesterday is to add the templates menu to the edit form! It makes much more sense... that was actually one of the first feature requests I had when I started using c5.
Good to see there are people still releasing free stuff :-)
Good to see there are people still releasing free stuff :-)
Yeah, selecting the templates while adding blocks would be nice for a few blocks..
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.
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.
This is the code I use:
$bt = BlockType::getByHandle('matogertel_area_splitter'); $templates = $bt->getBlockTypeCustomTemplates();
that's probably better..
Wanted to use the API for all the stuff without using a hardcoded handle but I guess your code is better anyways (:
Wanted to use the API for all the stuff without using a hardcoded handle but I guess your code is better anyways (:
(Untested)
$bt = BlockType::getByHandle($this->btHandle); $templates = $bt->getBlockTypeCustomTemplates();
btHandle was not available for me..
But it might be worth checking where it gets fetched.
But it might be worth checking where it gets fetched.
Thanks for the useful block!
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?
Thanks!
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?
Thanks!
Unfortunately there's no way to collapse other or several blocks at the moment. I had that idea a while ago but I just couldn't find enough time to do this.
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.
http://code.google.com/p/concrete5-expand-collapse/...
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.
http://code.google.com/p/concrete5-expand-collapse/...
Good to hear. Thanks for the update and info.
Another question:
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.
Thanks!
Edit: Putting more than one on the same page with default open seems to make it so you cannot close any of them...
http://gospelriver.com/bible-version-comparison/passage-comparison...
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.
Thanks!
Edit: Putting more than one on the same page with default open seems to make it so you cannot close any of them...
http://gospelriver.com/bible-version-comparison/passage-comparison...
I can't reproduce any of this. Scrapbook works fine so do different settings.
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/...
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/...
Thanks for checking into this.
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.
Nathan
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.
Nathan
Nathan, thanks for the detailed feedback. However, this is not an issue with my block but rather a general scrapbook limitation. Try the same with the content block and you'll have the same problem.
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.
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.
Ah, OK. It does seem to do it when I use the personal scrapbook also, but that undoubtedly is still a scrapbook issue.
Thanks.
Nathan
Thanks.
Nathan
This add-on is super useful. Thanks, Remo.
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:
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>';
Great! Glad you figured it out on your own!
I am trying to publish an expandable top ten list to my homepage each day, keeping old lists in blog format.
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.
Any suggestions?
Do i need to get a custom build to make that happen?
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.
Any suggestions?
Do i need to get a custom build to make that happen?
I don't know about all the add-ons in the marketplace but my add-on can't do that without some customization!
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:
http://c5.tktools.jp/index.php/concrete5/tabs/...
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:
http://c5.tktools.jp/index.php/concrete5/tabs/...
Hi Remo,
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!!
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!!
I'm sorry, but I don't see how this is related to my add-on?
Do you mean that only permissions on expand blocks are messed up?
Do you mean that only permissions on expand blocks are messed up?