- Posts: 7
COMMUNITY FORUM
how to acces author in tag.php template ?
- fred
-
Topic Author
- Offline
- New Member
Less
More
11 years 3 weeks ago #127813
by fred
how to acces author in tag.php template ? was created by fred
Hello,
How can i acces the author variable in the tag template ? I tried this:also tried with catItemAuthor but it doesn't work.
$items->parrams->get('itemAuthor) does return 1, but all i get is:
How can i acces the author variable in the tag template ? I tried this:
<?php if($item->params->get('itemAuthor')): ?>
<span class="catItemAuthor">
<?php echo K2HelperUtilities::writtenBy($item->author->profile->gender); ?>
<?php if(isset($item->author->link) && $item->author->link): ?>
<a rel="author" href="<?php echo $item->author->link; ?>"><?php echo $item->author->name; ?></a>
<?php else: ?>
<?php echo $item->author->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>
$items->parrams->get('itemAuthor) does return 1, but all i get is:
Notice: Undefined property: stdClass::$author in /srv/www/sandbox/jupgrade/templates/corpora/html/com_k2/templates/default/tag.php on line 57 Notice: Trying to get property of non-object in /srv/www/sandbox/jupgrade/templates/corpora/html/com_k2/templates/default/tag.php on line 57
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
11 years 3 weeks ago #127814
by Lefteris
Replied by Lefteris on topic Re: how to acces author in tag.php template ?
Hi. You can't. Author data is not available in tag listings.
Please Log in or Create an account to join the conversation.
- mobylak
-
- Offline
- New Member
Less
More
- Posts: 3
10 years 10 months ago #127815
by mobylak
Replied by mobylak on topic Re: how to acces author in tag.php template ?
Where is it found ? because i have a similar problem where the Author's page show only items written in english although the authors have articles in arabic (RTL).
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 10 months ago #127816
by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: how to acces author in tag.php template ?
This is not the case.
You need to edit the menu item to show content from All languages.
You need to edit the menu item to show content from All languages.
Please Log in or Create an account to join the conversation.