gMagicScott / wordpress-plugin_amazing-system

0 stars 1 forks source link

Nest additional shortcodes in `[switch]` #8

Closed gMagicScott closed 10 years ago

gMagicScott commented 11 years ago

After having a conversation with Christopher Cool, he is doing some really "cool" stuff with the [switch] shortcode.

The next level is using other shortcodes inside of a switch. This goes against the native WordPress shortcode functionality, so this may lend into starting a new shortcode displaying or hiding a content block based on $_REQUEST variables.

My initial thoughts are calling it block. The possible use is:

[block field="field1" value="show"]
    Hello there [as what="firstname"]! How are you today?
[/block]

A limitation I see initially is nesting blocks

[block field="field1" value="show"]
    [block field="field2" value="on"]
        Field 1 is showing and Field 2 is on.
    [/block]
    [block field="field2" value="off"]
        Field 1 is showing and Field 2 is off.
    [/block]
[/block]

This is probably a stand-alone issue, but still something to consider. Is the idea useful to have "advanced" control? if field1=show AND field2=on

Also, is block a good name? Any other ideas?

gMagicScott commented 11 years ago

CC @twinsmagic

twinsmagic commented 11 years ago

"block" works for me. I have to admit this is a bit above my intelligence level... :)

twinsmagic commented 11 years ago

oops, clicked the wrong button!

gMagicScott commented 11 years ago

That can be a little too easy to do.