CMS Development

rainism
Member

HubDB - group data

SOLVE

Hello.

I managed to group my rows by date.
The problem I have now - it prints the ids of the dates, I can't set any datetimeformat when printing {{ group.grouper }}

Also when I add a second group option into the first one, it just doubles the content

An example of my code ({{ group.grouper|datetimeformat('%H %p') }} just doesn't work, it sends an error):

{% for group1 in table|groupby('date') %}
     <p>{{ group.grouper|datetimeformat('%H %p') }}</p>
      {% for group in table|groupby('time') %}
         <p>{{ group.grouper }}</p>
         {% for row in group.list %}
               <div class="delivery">
                 <p>{{ row.name }}</p>
                 <p><a href="{{ row.url }}">Url</a></p>
               </div>
         {% endfor %}  
      {% endfor %}
{% endfor %}

 

0 Upvotes
1 Accepted solution
Anton
Solution
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

HubDB - group data

SOLVE

Hi @rainism

do you have a preview-link for the page you're building?

Also - have you tried the

|pprint

filter?

documetation: click me 

 

This should give you an overview of the code and you can debug better. 

 

 

best, 

Anton




check
Did my post help answer your query? Help the Community by marking it as a solution



View solution in original post

2 Replies 2
Anton
Solution
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

HubDB - group data

SOLVE

Hi @rainism

do you have a preview-link for the page you're building?

Also - have you tried the

|pprint

filter?

documetation: click me 

 

This should give you an overview of the code and you can debug better. 

 

 

best, 

Anton




check
Did my post help answer your query? Help the Community by marking it as a solution



sharonlicari
Community Manager
Community Manager

HubDB - group data

SOLVE

Hey @rainism  

 

I will tag a few of our experts to learn from them.   

       

Hey @DanielSanchez @Adesignl @Anton could you please share your knowledge with @rainism?

 

Thank you & Happy Holidays

Sharon Emoticono feliz


¿Sabías que la Comunidad está disponible en Español?
¡Participa hoy en conversaciones en el idioma de tu preferencia,cambiando el idioma en tus configuraciones!

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


0 Upvotes