Keyword

Getting the author and tag name inside tag.php page!

  • Shir Ekerling
  • Shir Ekerling's Avatar Topic Author
  • Offline
  • New Member
More
9 years 4 months ago #134351 by Shir Ekerling
Hello all!

I'm struggling with the TAG page itself can't fetch some important data (The page that shows all the posts with the selected tag).

1) I want to display the name of the active tag (this is the file -> tag.php) but couldn't do that, i was trying to fetch it with:

<?php echo $tag->name; ?>

This didn't work.

2) It seems like author data is not available for the TAG page, couldn't echo the data of the author, not it's name: <?php echo $this->user->name; ?>

and not it's image: <img src="<?php echo $this->user->avatar; ?>">

Am I missing something or the tag.php just can't do those stuff?

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #134366 by Lefteris
Hi. Regarding your questions:

1. The tag is always passed in the URL. This means that you can show it like this:
<?php echo JRequest::getVar('tag'); ?>
2. Author information is not available in the tag view. You can see all the available data for this view at the K2 parameters.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Shir Ekerling
  • Shir Ekerling's Avatar Topic Author
  • Offline
  • New Member
More
9 years 4 months ago #134369 by Shir Ekerling
Replied by Shir Ekerling on topic Getting the author and tag name inside tag.php page!
Thank you Lefteris!
Is there a plugin you might know about that will allow me displaying the author in this view?
Is it even possible to create one?
If so, maybe would you want to take that job / pass me to someone you know who might be interested?

Thanks!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 4 months ago #134401 by Krikor Boghossian
Replied by Krikor Boghossian on topic Getting the author and tag name inside tag.php page!
Hello Shir,

You can look at the JED for an extension.
Also please take a look at this thread. www.joomlaworks.net/forum/k2-en/32215-solved-author-in-tag-listings?start=10#112883

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum