Support

  1. ggaillet
  2. Support
  3. Tuesday, March 08 2016, 03:32 AM
Is there a way to add more than 6 columns in the user list menu item?
Thanks.
ggaillet Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 1
admin Accepted Answer
Admin
Hi,
there are different way to do this, Joomla template override allow you also to create many views (menu item type), but this is a bit complex.

You can simply use a single override and add some control, for example you have 2 menu items of type Easy Profile->User List (table)
- "List 1" with ID 201
- "List 2" with ID 202

now you can simply change the code like this:
- in file /templates/your-template-folder/html/com_jsn/list/table.php after line 70 you can add something like this:
if ( JRequest::getVar( 'Itemid' ) == 201 ) {
echo('<th>Field A title</th>');
echo('<th>Field B title</th>');
}
if ( JRequest::getVar( 'Itemid' ) == 202 ) {
echo('<th>Field C title</th>');
echo('<th>Field D title</th>');
}

- in file /templates/your-template-folder/html/com_jsn/list/table_user.php after line 136 you can add something like this:
<?php if ( JRequest::getVar( 'Itemid' ) == 201 ) : ?>
<td>
<?php echo $this->user->getField('fieldA',true); ?>
</td>
<td>
<?php echo $this->user->getField('fieldB',true); ?>
</td>
<?php endif; ?>
<?php if ( JRequest::getVar( 'Itemid' ) == 202 ) : ?>
<td>
<?php echo $this->user->getField('fieldC',true); ?>
</td>
<td>
<?php echo $this->user->getField('fieldD',true); ?>
</td>
<?php endif; ?>
  1. more than a month ago
  2. Support
  3. # 2
ggaillet Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 3
admin Accepted Answer
Admin
Hi,
this override changes only frontend output, you can't change menu item options (otherwise when you update Easy Profile you will lost all changes).

You need to add in your overrides static code. Example to add column for field "interests":
- in file /templates/your-template-folder/html/com_jsn/list/table.php you need to add table header, so at after line 70 you can add something like this:
echo('<th>Interests</th>');

- in file /templates/your-template-folder/html/com_jsn/list/table_user.php you need to add user field, so at after line 136 you can add something like this:
<td>	
<?php echo $this->user->getField('interests',true); ?>
</td>
  1. more than a month ago
  2. Support
  3. # 4
ggaillet Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
Hi,
yes this is possible, but require PHP knowledge. You can override list templates:
- Copy file from /components/com_jsn/views/list/tmpl/table.php into /templates/your-template-folder/html/com_jsn/list/table.php
- Copy file from /components/com_jsn/views/list/tmpl/table_user.php into /templates/your-template-folder/html/com_jsn/list/table_user.php

Now you can customize your new files.

Keep in mind that tables do not adapt well to responsive layouts, many columns ruin viewing on phones.
  1. more than a month ago
  2. Support
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.