CMS Development

Raghavendra
Teilnehmer/-in | Platinum Partner
Teilnehmer/-in | Platinum Partner

How to sort the hubdb data, if hubdb table particular column is checked

lösung

Raghavendra_0-1680249123604.png

 

<div id="applynow" class="GrowingTeamOuterWrapper" style="background-color:{{ module.style.background_color.color }};padding: {{ module.style.padding_top }}px 0px {{ module.style.padding_bottom }}px;">
<div class="page-center">
<div class="GrowingTeamHeading">
<h2 style="color:{{ module.style.heading_color.color }};">{{ module.heading }}</h2>
<p style="color:{{ module.style.content_color.color }};">{{ module.content }}</p>
</div>
{% set table_headline = hubdb_table_column(module.hubdbtable_field, "region_v2").options %}
<div class="FilterColumn">
<select>
<option value="all">Filter by region</option>
{% for varName in table_headline %}
{% set region = varName.name %}
<option value="{{ region }}">{{ region }}</option>
{% endfor %}
</select>
<div class="pagination-container"></div>
</div>
{% set table_toget_col = hubdb_table_rows(module.hubdbtable_field) %}
<div class="GrowingTeamInnerWrapper">
{% for row_toget_col in table_toget_col %}
{% if (row_toget_col['close_date'] >= unixtimestamp(local_dt))%}
<div class="GrowingTeamCol {% for row_multi in row_toget_col.region_v2 %} {{ row_multi.name|replace(' ', '-')|replace('/', '-')|replace('---', '-') }} {% endfor %}">
<div class="LabelCol">
<p>{% for row_multi in row_toget_col.region_v2 %} {{ row_multi.name }}{% if not loop.last %}, {% endif %} {% endfor %}</p>
</div>
<div class="HeadingWrapper">
<h2>{{ row_toget_col.job_title }}</h2>
</div>
<div class="DetailsWrapper">
<ul>
<li><img src="https://fs.hubspotusercontent00.net/hubfs/5217051/IQGeo-2021/Careers-Page/Icon%20feather-map-pin.svg"> {% for row_loc in row_toget_col.location %} {{ row_loc.name }} {% endfor %}</li>
<li><img src="https://fs.hubspotusercontent00.net/hubfs/5217051/IQGeo-2021/Careers-Page/Icon%20metro-calendar.svg"> Apply by: {{ row_toget_col.close_date|datetimeformat('%B %d %Y') }}</li>
</ul>
</div>
<div class="DescriptionWrapper">
<p>{{ row_toget_col.short_description }}</p>
</div>
<div class="BtnWrapper">
<a href="{{ row_toget_col.job_description_link }}">Find out more</a>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<div class="pagination-container"></div>
</div>
</div>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha512-+NqPlbbtM1QqiK8ZAo4Yrj2c4lNQoGv8P79DPtKzj++l5jnN39rHA/xsqn8zE9l0uSoxaCdrOgFs6yjyfbBxSg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/simplePagination.js/1.6/jquery.simplePagination.js" integrity="sha512-6Hh5t357FBmgv+xCBoaF9Gbk6sEF00WCH5wC8R1uieSL1R4pN2HFZx/cyE/TdfW+dxtOBWcHF1ZYdV8XLbpprA==" crossorigin="anonymous"></script>

<style>
.FilterColumn select, .HeadingWrapper h2, .DetailsWrapper ul li,.DescriptionWrapper p{
color: {{ module.style.content_color.color }};
</style>

 

the checked column data should display first, rest data should display last

0 Upvotes
1 Akzeptierte Lösung
stefen
Lösung
Autorität | Partner
Autorität | Partner

How to sort the hubdb data, if hubdb table particular column is checked

lösung

@PamCotton @Raghavendra you can use the following argument in your table rows function:

{% set table_toget_col = hubdb_table_rows(module.hubdbtable_field, "&orderBy=the_column_name_with_checkmarks") %}

If you want the order reversed you can add a - symbol right before the column name like so:

{% set table_toget_col = hubdb_table_rows(module.hubdbtable_field, "&orderBy=-the_column_name_with_checkmarks") %}




Stefen Phelps, Community Champion, Kelp Web Developer

Lösung in ursprünglichem Beitrag anzeigen

3 Antworten
PamCotton
Community-Manager/-in
Community-Manager/-in

How to sort the hubdb data, if hubdb table particular column is checked

lösung

Hello @Raghavendra, thank you for posting in our Community!

I want to invite our top experts to share their thoughts @Brownstephen101 @miljkovicmisa @stefen any recommendations for @Raghavendra?

 

Thank you,

Pam

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes
stefen
Lösung
Autorität | Partner
Autorität | Partner

How to sort the hubdb data, if hubdb table particular column is checked

lösung

@PamCotton @Raghavendra you can use the following argument in your table rows function:

{% set table_toget_col = hubdb_table_rows(module.hubdbtable_field, "&orderBy=the_column_name_with_checkmarks") %}

If you want the order reversed you can add a - symbol right before the column name like so:

{% set table_toget_col = hubdb_table_rows(module.hubdbtable_field, "&orderBy=-the_column_name_with_checkmarks") %}




Stefen Phelps, Community Champion, Kelp Web Developer
Raghavendra
Teilnehmer/-in | Platinum Partner
Teilnehmer/-in | Platinum Partner

How to sort the hubdb data, if hubdb table particular column is checked

lösung

thanks it is working its my mistake..😊

0 Upvotes