-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nesting shortcodes #2
Comments
it's highly possible. If you look at the original implementation, that's what Barney does - I just didn't have the time to implement it. it involves recalling the shortcode function from within the shortcode. |
Tried my hand at it today but was unable to get it working. However I did find a shortcodes cfc that handles nesting. It might help you get it working: |
That's what I based it off in the first place!! ;)
|
Lol, oh man... I just reimplemented the whole plugin using his code, apparently even though he has tests for nested tags, they don't actually parse nested content. Well, switching back to yours since the code is way prettier :) Okay, so I figured out a work around for now, calling processShortcodes(content) inside the shortcode. Also, you can't nest the same shortcode, ie [bootstrap type="row"] [bootstrap type="col"] test [/bootstrap][/bootstrap] because it doesn't parse it right. But you can nest two different shortcodes, ie[bootstrap type="row"] [bootgrid col="12"] test [/bootgrid] [/bootstrap] |
:) Yeah, I do the process shortcodes inside the shortcode thing. Works ok for simple stuff!
|
PS, if you’re implementing Bootstrap grids, you really do need to check out gridmanager.js :P [shameless plug]
|
I know this isn't available yet but I have a usecase.
[bootstrap type="row"]
[bootstrap type="col" width="6" size="md"] My First Column! [/bootstrap]
[bootstrap type="col" width="6" size="md"] My Second Column! [/bootstrap]
[/bootstrap]
Is nesting a possible future enhancement or is it impossible?
The text was updated successfully, but these errors were encountered: