Open timsayshey opened 9 years ago
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: http://www.barneyb.com/barneyblog/2010/03/13/wordpress-shortcodes-in-cfml/
That's what I based it off in the first place!! ;)
On 28 Aug 2015, at 17:16, Tim Badolato notifications@github.com wrote:
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: http://www.barneyb.com/barneyblog/2010/03/13/wordpress-shortcodes-in-cfml/
— Reply to this email directly or view it on GitHub.
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!
On 28 Aug 2015, at 17:54, Tim Badolato notifications@github.com wrote:
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]
— Reply to this email directly or view it on GitHub https://github.com/neokoenig/cfwheels-shortcodes/issues/2#issuecomment-135831303.
PS, if you’re implementing Bootstrap grids, you really do need to check out gridmanager.js :P [shameless plug]
On 28 Aug 2015, at 17:54, Tim Badolato notifications@github.com wrote:
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]
— Reply to this email directly or view it on GitHub https://github.com/neokoenig/cfwheels-shortcodes/issues/2#issuecomment-135831303.
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?