maps in tabs- nesting shortcode

Home Forums MapPress Support maps in tabs- nesting shortcode

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9397
    jakbaustudio
    Participant

    hi,

    My tabs and maps works good when I paste shortcode on page/entry, the problem shows up when I want to nest two shortcodes in the code by <?php echo do_shortcode…. >

    I can nest shortcode, but when add attributes to mashup nothing loads.

    I want to do

    [tabset]

    [tab]

    [masup  category 1 ]

    [/tab]

    [tab]

    [masup category 2 ]

    [/tab]

    [/tabset]

    This code is schematic.

     

    Any idea how to solve that?

     

    #9425
    Chris
    Keymaster

    Hi, I’m not sure I understand what you’re trying to do. Are you trying to get maps to work inside tabs when using the WordPress post/page editor?

    Or are you trying to output tabs with maps in your template files using the do_shortcode() function?

    Could you explain further? Do you have an example of your actual code?

    #9426
    jakbaustudio
    Participant

    Hi,

    I’m trying paste maps in my template file using do_shortcode() function

    This code works almost good, but in TEST TAB 2 and 3 maps are not zoomed.

    <?php do_shortcode(“[tab name=’TEST TAB 1′] [mashup][/tab]”);
    do_shortcode(“[tab name=’TEST TAB 2′][mashup][/tab];”);
    do_shortcode(“[tab name=’TEST TAB 3′][mashup][/tab];”);
    echo do_shortcode(“[end_tabset]”);?>

     

    problem is when I paste attributes to mashup like:

    <?php do_shortcode(“[tab name=’TEST TAB 1′] [mashup maptypeid=”terrain” zoom=”6″ center_lat=”51.984880″ center_lng=”19.401855″ width=”600″ height=”500″][/tab]”);
    do_shortcode(“[tab name=’TEST TAB 2′][mashup show=”query” maptypeid=”terrain” show_query=”category_name=turystyka-i-relaks” zoom=”6″ center_lat=”51.984880″ center_lng=”19.401855″ width=”600″ height=”500″][/tab];”);
    do_shortcode(“[tab name=’TEST TAB 3′][mashup show=”query” show_query=”category_name=zabytki-i-zwiedzanie” maptypeid=”terrain” zoom=”6″ center_lat=”51.984880″ center_lng=”19.401855″ width=”600″ height=”500″][/tab];”);
    echo do_shortcode(“[end_tabset]”);?>

     

    This stuff doesn’ load. Any ideas? would be greatfull for that.

     

    u can see that here:

    http://blaskipolski.pl/

     

    it works on page edit see sample here: http://blaskipolski.pl/domo/

    #9430
    Chris
    Keymaster

    Hi,

    Is it the same behavior when you put the shortcodes in a post (rather than using do_shortcode)?

    I don’t know how to see that on your site so I don’t know what you mean by it doesn’t load? You get a blank map? Or no map?

    What tab plugin are you using?

    I think the problem is that the tabs plugin must itself call do_shortcode() on its content, otherwise it won’t process the inside shortcodes. When I search on Google it seems a lot of people have this problem, for example:

    http://wordpress.stackexchange.com/questions/18659/nested-shortcode-doesnt-work

    I’m not sure it would work, but maybe you could first explode the map shortcode, then put the result in the tabs? That way they wouldn’t be nested any more:

    $tab1 = do_shortcode("[mashup]");
    $tab2 = do_shortcode("[mashup]");
    echo do_shortcode("[tab name='tab1']$tab1[/tab1]");

    #9456
    jakbaustudio
    Participant

    I have changed my strategy 🙂 instead of using do shortcode in template.

    I have created another widget area and put into template. When i paste nested shortcoede into widgets everything works great on homepage !

    http://blaskipolski.pl

     

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.