Two columns in Categories view

  • Dycon
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 weeks ago #29634 by Dycon
Two columns in Categories view was created by Dycon
Hi everyone, is there a way to have 2 columns in category vie instead of single column...
Right now is like this...

Event 1
Event 2
Event 3
and so on...

What I'd like to do is something like this...

[ Event 1 ] | [ Event 2 ]
[ Event 3 ] | [ Event 4 ]

or...

[ Event 1 ] | [ Event 3 ]
[ Event 2 ] | [ Event 4 ]

it doesn't really matter as long as I can get 2 columns, that would be great...

Thank you

Please Log in or Create an account to join the conversation.

More
11 years 2 weeks ago #29657 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Two columns in Categories view
Hi Dycon

In this case, you will need to customize the layout yourself. At the moment, Events Booking doesn't have a columns layout available.

Regards,

Tuan
The following user(s) said Thank You: Dycon

Please Log in or Create an account to join the conversation.

  • Dycon
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 2 weeks ago #29669 by Dycon
Replied by Dycon on topic Re: Two columns in Categories view
Thank you Tuan,

I really don't know how to do that...

I guess I can use the Joomla Category view as a guide...

I'll see what I can do...

Thank you!

Please Log in or Create an account to join the conversation.

  • Dycon
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 9 months ago #33786 by Dycon
Replied by Dycon on topic Re: Two columns in Categories view
Sorry to "re-open" this topic... I just want to let you know that I got this fix... dirty way but is working...

if I remember this correct in previews versions you use tables to display the events, so after the update I was looking at the templates, and I notices that now you are using div tags(much a appreciated), you probably used div tags before I just didn't paio attention to it...

So by using div tag is much easy to make 2 columns...

[event 1][event 2]
[event 3][event 4]

All i did was to add a class to the div tags
.TwocolsEvent {
display:inline-block
margin:0px 5px;
}

and a counter
$ec = 0; // to count events(my own way.... lol

so with that I can count every 2 events I add a div tag at the end of the first row

if ($ec == 2) {
echo '<div class="clearfix SpacerLine"></div>';
$ec = 0; // lets reset the count to 0
} else { $ec ++ // lets sum 1 };

(more or less...)
now my template display event like this:

[event 1] [event 2]
[event 3] [event 4]

Two columns!
nice uh!? :)

not the best way to do it but it works...

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #33799 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Two columns in Categories view
Thanks for sharing the code. Could you send me the link to the page you just customized so that I can see how it works ? If it looks good, I will add this kind of layout into the next release of the extension :).

Tuan

Please Log in or Create an account to join the conversation.

  • Dycon
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 9 months ago #33970 by Dycon
Replied by Dycon on topic Re: Two columns in Categories view
Sure... it is in development, a few more thing that needs to be on on that website but the changes I made to the EB are there and in working conditions...

www.karati.mx/expos-y-eventos.html


Thank you...

have a great day!

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc