9 years ago
6
Topic

Hello all,

I create an event system on my website.

Currently, my "Search and List type" lists all my events, item by item.
But, I would like to display my events grouped by months.

For exemple :


- September
-- event 1
-- event 2
-- event 3
...


- October
-- event 1
-- event 2
-- event 3
...

I think, I need to create a "php foreach" but I did'nt find the good syntax.
Can you help me ?

Thank you.

Get a Book for SEBLOD
103 Posts
Osep45
8 years ago
0
Level 1

Hi,

I want to do the same but can't manage it.

Does anyome know how to do that ?

Best regards,

4229 Posts
Kadministrator
8 years ago
0
Level 1

One way to do it:

103 Posts
Osep45
8 years ago
0
Level 1

Thank you Klas ! I will try that !

332 Posts
Kenneth
7 years ago
2
Level 1

Hi,

Anyone got an idea on how to solve this without having to use two content types?

67 Posts
Bonitto
7 years ago
1
Level 2

Trying to figure out myself.  I am also in a similar situation where I am trying to group content types (forms) by a certain field name. The only thing I can think of is using Joomlas default API to query the db for the data you need in your content view. 

If your content view has a full_text field you can use an extension such as Regular Labs Sourcerer to write your query and then take your results and style it accordingly: Selecting Data Using JDatabase

I haven't quite worked out the details yet but I know this is probably the best direction 

4229 Posts
Kadministrator
7 years ago
0
Level 3

Easiest way to do this would probably be to create new template (based on existing one eg. seb_list, there are no overrides for list tempaltes) and do grouping there

Get a VIP membership