Keyword

[SOLVED] user items in columns

More
11 years 2 weeks ago #118286 by wone
[SOLVED] user items in columns was created by wone
Hello community!
I am trying to display user items in the user page view in tabs. Every tab representing a category. If this is not possible, i would like the items to appear in columns like in a category view.
I don't know what to do to achieve this.
Can someone help me?
Thanks

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 2 weeks ago #118287 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: user items in columns
It is possible, modify the user.php to display the items in columns.
I think you can display them it tabs as well.

Before doing anything, read about template overrides in the tutorials to avoid any problems in the K2 upgrade process.

Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store

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

More
11 years 2 weeks ago #118288 by wone
Replied by wone on topic Re: user items in columns
Thank you Mohamed. "jazakumu'Llaahu khayran"!! I'm gonna try it soon and will tell you if it worked. Thanks!!!

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

More
11 years 2 weeks ago #118289 by wone
Replied by wone on topic Re: user items in columns
ok i have override the template, but i don't know what to modify in the user.php file to look like the category.php file and appear like this y-designs.com/images/stories/tutorials/2013/May/3/layout.jpg
with item list primary, secondary and leading.
Thanks

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118290 by Yiota
Replied by Yiota on topic Re: user items in columns
Hello wone,

The user.php doesn't have the option for Leading, Primary, etc. You will have to write the code by yourself in order to achive this. The easiest way is to choose what list/grid you want to use (1, 2, 3 or 4 columns) and make the appropriate changes in the code.

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

More
11 years 2 weeks ago #118291 by wone
Replied by wone on topic Re: user items in columns
Thank you , Yiota
i want to have 3 columns. But how to write this code?
some links please.
Thanks in advance!!!

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

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118292 by Yiota
Replied by Yiota on topic Re: user items in columns
Just locate
<?php foreach ($this->items as $item): ?>

and replace it with
<?php foreach ($this->items as $countItems=>$item): ?>

Then right above the <?php endforeach; ?> add this line
<?php if (($countItems+1)%3==0) echo '<div class="clr"></div>'; ?>

Then all else will be made through CSS. Add something like this:

.userItemView {float:left;width:33.3333%;}

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

More
11 years 2 weeks ago #118293 by wone
Replied by wone on topic Re: user items in columns
hi again,
i have added the codes as you told me and for the css i put it here
Log in  or Create an account to join the conversation.

  • Yiota
  • Yiota's Avatar
  • Visitor
11 years 2 weeks ago #118294 by Yiota
Replied by Yiota on topic Re: user items in columns
Could you provide a link to your page?

Thank you.

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

More
11 years 2 weeks ago - 11 years 2 weeks ago #118295 by wone
Replied by wone on topic Re: user items in columns

Part of the message is hidden for the guests. Please log in or register to see it.

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