CMS Development

gramirez
Contributor

I need to create 2 columns inside this tabber module, please assist asap!

I have a tabber module that requries a 2 column layout (one image and text on the right, see attached). Each tabbed section will share the same layout. I was instructed to hard code this and I'm not sure the best way to go about doing this as I'm very new to HubSpot CMS and web development. Please assist asap! Thank you so much!
Here is the link: 
https://go.socialstudies.com/microcredentials-0

Screen Shot 2020-08-05 at 10.38.48 AM.pngScreen Shot 2020-08-05 at 10.32.52 AM.png

0 Upvotes
8 Replies 8
Anton
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

I need to create 2 columns inside this tabber module, please assist asap!

Hi @gramirez,

since you're using Vast - modify your tabber module as following:

<div class="tabber-content">
<div class="tab-pane active" id="tab-1">
<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>
<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>
</div>
<div class="tab-pane" id="tab-2">
<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>
<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>
</div>
<div class="tab-pane" id="tab-3">
<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>
<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>
</div>
<div class="tab-pane" id="tab-4">
<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>
<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>
</div>
</div>

you can change the span number to anything you want BUT both numbers inside a "tab-pane" have to be equal 12. Here some examples: span2 + span10, span3 + span9, span 4 + span8...

 

Also: wrap the module in the design-manager into a few groups and give them propper classes (like container and page-center) so that the content is not full-width(unless you want so).

It should look like this (of course with your header and footer)

wrapping class/groupwrapping class/group

I've added a few random modules to the group to show you how you should build your groups. The

.page-center

class is the Vast default to set everything inside to a max-width of 1260px(if I'm correct and you didn't change it)

 

 

best,

Anton

Anton Bujanowski Signature
0 Upvotes
gramirez
Contributor

I need to create 2 columns inside this tabber module, please assist asap!

This helps, I've put in the code you gave me and It's looking good.,

0 Upvotes
gramirez
Contributor

I need to create 2 columns inside this tabber module, please assist asap!

Screen Shot 2020-08-05 at 12.10.11 PM.png

0 Upvotes
Anton
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

I need to create 2 columns inside this tabber module, please assist asap!

great!

 

Consider to create a custom module with a repeater function for this - this might help you/your content-creators. 

 

If you don't have further questions/problems mark it as "solved" - it helps the community 🙂 

 

 

best, 

Anton

Anton Bujanowski Signature
0 Upvotes
gramirez
Contributor

I need to create 2 columns inside this tabber module, please assist asap!

I don't know how to create a custom module with a repeater function. Any tips or links you'd recommend? I have to complete this in about 3 hours.

0 Upvotes
Anton
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

I need to create 2 columns inside this tabber module, please assist asap!

hey,

 

here's a link about repeater fields:

https://designers.hubspot.com/blog/repeating-fields-in-the-new-module-framework

 

basicly you create a new module in the design manager with the wrapping divs, add your desired functions on the right sidebar; group them and enable the repeater function in the group. 

 

Your code should look like this

the complete source codethe complete source code

enabled options in the tab groupenabled options in the tab group

 

here's the source code:

<div class="tabber-wrap blog-tabber">
  <ul class="clearfix tabber-tabs">
    {% for item in module.single_tab %}
    <li><a href="#tab-{{loop.index0}}">{{ item.tab_name }}</a></li>
    {% endfor %}
  </ul>
</div>


<div class="tabber-content">
  {% for item in module.single_tab %}
  <div class="tab-pane" id="tab-{{loop.index0}}">
    <div class="span6 left-tab-col">
      {% if item.image.src %}
      {% set sizeAttrs = 'width="{{ item.image.width }}" height="{{ item.image.height }}"' %}
      {% if item.image.size_type == 'auto' %}
      {% set sizeAttrs = 'style="max-width: 100%; height: auto;"' %}
      {% elif item.image.size_type == 'auto_custom_max' %}
      {% set sizeAttrs = 'width="100%" height="auto" style="max-width: {{ item.image.max_width }}px; max-height: {{ item.image.max_height }}px"' %}
      {% endif %}
      <img src="{{ item.image.src }}" alt="{{ item.image.alt }}" {{ sizeAttrs }}>
      {% endif %}
    </div>
    <div class="span6 right-tab-col">{% inline_rich_text field="richtext_field" value="{{ item.richtext_field }}" %}</div>
  </div>
  {% endfor%}
</div>

You need to recreate the functions exactly as seen in the first screen - unless you know what you do 🙂

 

 

best, 

 

Anton

Anton Bujanowski Signature
0 Upvotes
gramirez
Contributor

I need to create 2 columns inside this tabber module, please assist asap!

I think I'm getting closer to what was requested. It was made clear that this was to be hard-coded so I'm going to wait on the repeater module. Any tips or advice is much appreciated.

Here is my code so far:

<!-- ************ Embedded CSS ************ -->
<style>

.tabber_content_columns {
display: flex;
flex-wrap: wrap;
}
.thumb_prod_image {
width: 30%;
float: left;
}

.tabber_product_title {
font-size: 18px;
font-weight: bold;
}

.tabber_product_code {
font-size: 12px;
line-height: 25px;
}
.tabber_product_location {
font-size: 14px;
}

div.right-side-text {
float: initial;
margin-left: 180px;
}

</style>


<!-- ************ TABBER WRAPPER ************ -->
<div class="tabber-wrap blog-tabber">

<!-- ************ TABBER TABS ************ -->
<ul class="clearfix tabber-tabs">
<li class="active"><a href="#tab-1">Trifold Set</a></li>
<li><a href="#tab-2">Extra Flyers</a></li>
<li><a href="#tab-3">Landing Pages</a></li>
<li><a href="#tab-4">Videos</a></li>
</ul>

<!-- ************ TABS 1-4 CONTENT ************ -->
<div class="tabber-content">

<!--TAB 1-->
<div class="tab-pane active" id="tab-1">
<!-- Left Column -->
<div class="span6 left-tab-col">
<!-- Image -->
<div style="flex-basis: 50%;"><img class="thumb_prod_image" src="https://f.hubspotusercontent30.net/hubfs/3377481/Marketing%20Collateral%20Digital%20Catolog/Active%2...>
<!-- Text -->
<div class="right-side-text">
<div class="tabber_product_title" style="flex-basis: 50%;">Grade 5 License</div>
<div class="tabber_product_code" style="flex-basis: 50%;">MKTAC-FLL1</div>
<div class="tabber_product_location" style="flex-basis: 50%;">Z:\_PROJECTS-Proprietary\_Marketing\MKTAC_Active Classroom Sales Bundle\MKTAC-FL_Active Classroom Flyers\MKTAC-FLL_License Specific Flyers\MKTAC-FLL1_Grade 5 License\3Export\z_old</div>
</div>
</div>
<!-- Right Column -->
<div class="span6 right-tab-col">
<!-- Image -->
<div style="flex-basis: 50%;"><img class="thumb_prod_image" src="https://f.hubspotusercontent30.net/hubfs/3377481/Marketing%20Collateral%20Digital%20Catolog/Active%2...>
<!-- Text -->
<div class="right-side-text">
<div class="tabber_product_title" style="flex-basis: 50%;">Grade 6 License</div>
<div class="tabber_product_code" style="flex-basis: 50%;">MKTAC-FLL2</div>
<div class="tabber_product_location" style="flex-basis: 50%;">Z:\_PROJECTS-Proprietary\_Marketing\MKTAC_Active Classroom Sales Bundle\MKTAC-FL_Active Classroom Flyers\MKTAC-FLL_License Specific Flyers\MKTAC-FLL2_Grade 6 License\3Export\z_old</div>
</div>
</div>



<!--TAB 2-->
<div class="tab-pane" id="tab-2">
<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>
<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>
</div>
<div class="tab-pane" id="tab-3">
<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>
<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>
</div>
<div class="tab-pane" id="tab-4">
<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>
<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>
</div>
</div>

</div>
</div>

<!-- ************ Embedded CSS ************ --> 

<style>

 

.tabber_content_columns {

   display: flex; 

   flex-wrap: wrap;

  }

.thumb_prod_image {

width: 30%;

  float: left;

  }

  

.tabber_product_title {

  font-size: 18px;

  font-weight: bold;

  }

  

.tabber_product_code {

  font-size: 12px;

  line-height: 25px;

  }

.tabber_product_location {

  font-size: 14px;

  }

  

div.right-side-text {

float: initial;

 margin-left: 180px;

  }

  

</style>

 

 

<!-- ************ TABBER WRAPPER ************ --> 

<div class="tabber-wrap blog-tabber">

  

<!-- ************ TABBER TABS ************ --> 

    <ul class="clearfix tabber-tabs">

      <li class="active"><a href="#tab-1">Trifold Set</a></li>

      <li><a href="#tab-2">Extra Flyers</a></li>

      <li><a href="#tab-3">Landing Pages</a></li>

      <li><a href="#tab-4">Videos</a></li>

    </ul>

  

<!-- ************ TABS 1-4 CONTENT ************ --> 

<div class="tabber-content">

  

 

<!--TAB 1--> 

<div class="tab-pane active" id="tab-1">

<!-- Left Column --> 

<div class="span6 left-tab-col">

<!-- Image --> 

<div style="flex-basis: 50%;"><img class="thumb_prod_image" src="https://f.hubspotusercontent30.net/hubfs/3377481/Marketing%20Collateral%20Digital%20Catolog/Active%2...>

<!-- Text --> 

  <div class="right-side-text">

    <div class="tabber_product_title" style="flex-basis: 50%;">Grade 5 License</div>

<div class="tabber_product_code" style="flex-basis: 50%;">MKTAC-FLL1</div>

<div class="tabber_product_location" style="flex-basis: 50%;">Z:\_PROJECTS-Proprietary\_Marketing\MKTAC_Active Classroom Sales Bundle\MKTAC-FL_Active Classroom Flyers\MKTAC-FLL_License Specific Flyers\MKTAC-FLL1_Grade 5 License\3Export\z_old</div>

    </div>

 </div>

<!-- Right Column --> 

<div class="span6 right-tab-col">

<!-- Image --> 

<div style="flex-basis: 50%;"><img class="thumb_prod_image" src="https://f.hubspotusercontent30.net/hubfs/3377481/Marketing%20Collateral%20Digital%20Catolog/Active%2...>

<!-- Text --> 

    <div class="right-side-text">

  <div class="tabber_product_title" style="flex-basis: 50%;">Grade 6 License</div>

<div class="tabber_product_code" style="flex-basis: 50%;">MKTAC-FLL2</div>

<div class="tabber_product_location" style="flex-basis: 50%;">Z:\_PROJECTS-Proprietary\_Marketing\MKTAC_Active Classroom Sales Bundle\MKTAC-FL_Active Classroom Flyers\MKTAC-FLL_License Specific Flyers\MKTAC-FLL2_Grade 6 License\3Export\z_old</div>

    </div>

  </div>

  

  

  

<!--TAB 2--> 

<div class="tab-pane" id="tab-2">

<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>

<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>

</div>

<div class="tab-pane" id="tab-3">

<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>

<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>

</div>

<div class="tab-pane" id="tab-4">

<div class="span6 left-tab-col">YOUR CONTENT FOR THE LEFT COLUMN OF THE TAB GOES HERE</div>

<div class="span6 right-tab-col">YOUR CONTENT FOR THE RIGHT COLUMN OF THE TAB GOES HERE</div>

</div>

</div>

  

 

  </div>   

0 Upvotes
gramirez
Contributor

I need to create 2 columns inside this tabber module, please assist asap!

I really just need each tab to hold the same 2 column layout at this point. It's ok if it's all hardcoded.Screen Shot 2020-08-05 at 10.36.41 AM.png

0 Upvotes