1. stephanie-nugent
  2. Support
  3. Saturday, April 16 2016, 07:55 PM
I need to change the layout of the fields that display when anyone views the profile (Our users are only RV Dealers and they WANT people to call and email them, so all information is public). I would like to turn three fields into buttons (via CSS) and move them up to the top above all the other information. I have used the information for developers on this site and created a template override (attached), but can't get it to work. The links in the buttons are blank. How can I display the selected user's information?
stephanie-nugent Accepted Answer
Pro
well, I was not able to upload the file, but here is my code:
<!-- HERE IS THE CODE i AM TRYING TO GET TO WORK -->
<a class="basecolor7_button" href="<?php $user=JsnHelper::getUser(); echo $user->getField('ads_page'); ?>">See Our Ads</a>
<a class="basecolor7_button" href="mailto:<?php $user=JsnHelper::getUser(); echo $user->getField('Email1'); ?>">EMail Us</a>
<a class="basecolor7_button" href="<?php $user=JsnHelper::getUser(); echo $user->getField('website'); ?>" target="_blank">Visit Website</a>
<!-- THE REMAINDER IS THE NORMAL CODE FROM THE COMPONENT -->
  1. more than a month ago
  2. Support
  3. # 1
admin Accepted Answer
Admin
hi,
JsnHelper::getUser() return a current logged user object, so if you are a guest it return emply value.
try to use something like this: JsnHelper::getUser( $this->data->id )
in profile view $this->data->id return a displayed user id.

NOTE: this forum not allow you to upload PHP files, you need archive in ZIP file before upload ;)
  1. more than a month ago
  2. Support
  3. # 2
  • Page :
  • 1


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