By Sabih on Sunday, 16 July 2017
Replies 10
Likes 0
Views 1K
Votes 0
Hey there,

I went through the developer documentation but could not find it. Could you tell me how to retrieve the mini header? I want to add it to the JReviews favorites page but I could find the file the mini header is defined but not the file where it is called. Maybe you can name an existing file of easysocial as an example?
You can try this following code :


$user = ES::user($userObj);
$miniheader = ES::template()->html('html.miniheader', $user);


And this is the miniheader method file location -> JoomlaFolder/administrator/components/com_easysocial/includes/template/helpers/html.php , if you pass group/page/event object, so it will render group/page/event miniheader on the page.
·
Sunday, 16 July 2017 09:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you very much Arlex!

It is working to have EasySocial mini header on JReviews favorites page. It was a bit tricky to get the user id of the favorite's list instead of the logged in one. Probably not the best solution but it is not stupid if it works.

I have renamed the thread title and the category to be found.

For anyone looking for this solution. You need to edit the file com_jreviews/jreviews/views/themes/default/listings/listings_favorites.thtml and insert the following below /* PAGE HEADER */


<?php
$uri = JFactory::getURI();
$absolute_url = $uri->toString();

$testid = JString::str_ireplace( 'LINK OF FAVORITES SITE WITHOUT ID' , '' , $absolute_url );

require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/easysocial.php');
$esuser = ES::user($testid);
?>
<div id="es" class="es"> <?php echo ES::template()->html('html.miniheader', $esuser); ?>
</div>


The link you need to insert is the one of the site the favorites are without the id at the end. You should insert something like this:
https://yourdomain/jreviews/favorites?user=
·
Monday, 17 July 2017 00:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for sharing Sabih
·
Monday, 17 July 2017 15:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Sabih,
maybe you can share a screenshot of the final result !?
looks intreresting!
·
Tuesday, 18 July 2017 00:39
·
0 Likes
·
0 Votes
·
0 Comments
·
You can see it in action here:

https://goo.gl/c33nfo

·
Tuesday, 18 July 2017 03:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for the share Sabih, awesome !
·
Wednesday, 19 July 2017 17:02
·
0 Likes
·
0 Votes
·
0 Comments
·
It's really good to see community members helps one another Thumbs up to Sabih! I hope more of you would collaborate on our forums, it really is very helpful for us!
·
Thursday, 20 July 2017 00:00
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post