Support

  1. mr412
  2. General
  3. Wednesday, May 01 2019, 08:47 AM
Hi
How can I format a list field like <ul><li></li></ul> ?
Thanks in advance =)
admin Accepted Answer
Admin
Hi,
sorry for late reply, try with this code:
<?php if( is_array( $this->user->getValue( $field ) ) ) { echo '<ul><li>'.implode( '</li><li>',explode( ',' , $this->user->getField( $field ) ) ).'</li></ul>'; } else { echo $this->user->getField( $field, true ); } ?>
  1. more than a month ago
  2. General
  3. # 1
mr412 Accepted Answer
Content Protected
  1. more than a month ago
  2. General
  3. # 2
mr412 Accepted Answer
Content Protected
  1. more than a month ago
  2. General
  3. # 3
admin Accepted Answer
Admin
Ok, now I have understood, try with these steps:
- Copy file from /components/com_jsn/views/list/tmpl/table_user.php at /templates/your-theme-folder/html/com_jsn/list/table_user.php
- Edit new file and replace all occurrences of
<?php  echo $this->user->getField($field,true); ?>
with this code
<?php if( is_array( $this->user->getValue( $field ) ) ) { echo '<ul><li>'.implode( '</li><li>',$this->user->getValue( $field ) ).'</li></ul>'; } else { echo $this->user->getField( $field, true ); } ?>


Basically if the raw value of the field is an array then it will be displayed like HTML list.
  1. more than a month ago
  2. General
  3. # 4
mr412 Accepted Answer
Thanks. Thats not what I mean. See please the image the column "Lehrbetrieb" this is a output from a selectlist... the output is not DL, DD.. the output is just the list in plaintext.. and I need to have "ul/li"
  1. more than a month ago
  2. General
  3. # 5
admin Accepted Answer
Admin
Hi,
you can use Joomla Template override feature, for example for profile page:
- Copy file from /components/com_jsn/views/profile/tmpl/default_fields.php at /templates/your-theme-folder/html/com_jsn/profile/default_fields.php
- Edit new file and replace HTML structure from DL,DT,DD to UL,LI
  1. more than a month ago
  2. General
  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.