1. webnicole
  2. Presales Question
  3. Tuesday, January 19 2016, 03:58 AM
Hi,

I'm very interested in your component but I need something special. I'm building a recipe website where users can post recipes using a recipe component. I would like to show some profile information about the chef of the recipe on each recipe detail page.
I think I can not use the author plugin because it only works on article pages, right?
But I understand that your component has a content plugin which allows to show user information in modules. Would it be possible to show the information of the recipe author instead?

Thanks a lot!

Best regards,
Webnicole
Accepted Answer
admin Accepted Answer
Admin
Hi,
I think I can not use the author plugin because it only works on article pages, right?
Yes, ti works only for Joomla articles.
But I understand that your component has a content plugin which allows to show user information in modules. Would it be possible to show the information of the recipe author instead?
No this is not possible, because you not have a user id, for example to see user avatar you need to use syntax like these:
- {user avatar} show avatar of current logged in user
- {user avatar id} show avatar of user with specific id - But you not have ID of author

The solution is to use our API, so you can override template of your component and add something like this:
<?php
require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$user=JsnHelper::getUser($author_id***);
echo $user->getField('avatar');
?>

***you need to find where is author id variable in this component

Docs about API: http://docs.easy-profile.com/index.php/article/jsnuser-object
  1. more than a month ago
  2. Presales Question
  3. # Permalink
webnicole Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Presales Question
  3. # 1
admin Accepted Answer
Admin
Hi
sorry there is no examples. All templates are differents, and the style needs to meets your template's look.
  1. more than a month ago
  2. Presales Question
  3. # 2
webnicole Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Presales Question
  3. # 3
  • Page :
  • 1


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