Attached is modified version including nesting and custom title support
| Project: | Collapsible Text |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | pukku |
| Status: | active |
Jump to:
Attached is a modified version of the module for Drupal 6 that incorporates the D6 porting by sze and adds two new features:
1) Nesting. The regexp function is rewritten based on the recursive BB code example from http://uk.php.net/manual/en/function.preg-replace-callback.php (example #3).
This allows collapsible boxes to placed inside each other.
2) Custom title. Allows for an optional title="my custom title" parameter in opening tag, ie [collapse title="My custom title"] or [collapse collapsed title="My custom title"]. I find this useful because I like to name the collapsible sections without having a header inside. The title must be after the "collapsible" option if used.
This should be backwards compatible with previous versions of the module.
Please note that I have not fully tested it, but it does work on my site. I hope it is useful to people.
Pukku, if you like the additions please add them to an official release!
Regards,
Justyn.
| Attachment | Size |
|---|---|
| collapse_text_nesting_title.tar_.gz | 7.27 KB |

#1
Nice!
#2
Not working for me, returning 'Page not found error' for pages with [collapse] on. Other port that I've downloaded here worked fine.
#3
Hi! I'm going to release a new version today that doesn't include the recursive matching. I still don't quite understand it, and I'm leery of committing any changes I don't understand.
I do, however, appreciate greatly that you made a recursive version, and once I understand it, I will definitely commit it.
Ricky
#4
Any updates on this?
Edit: This works great on my site, but it doesn't support the title= syntax, only the h1 syntax, which is bad since I have a lot of stuff using that already.
Any chance of merging in the recursive nesting into maybe, a Dev version?
#5
I would also be interested in the nesting feature