Keyword

Show "Related items (by tag)" without showing "Author options"

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 2 months ago #98691 by Odin Mayland
I must be doing something wrong.

 

It seems to be, that the only way to show "Related items (by tag)" in a k2item is to have at least one "Author options" shown.  Even though  "Related items (by tag)" is NOT listed in the Author Options list of the "Item View Options".

 

I do not want to show any Author Options.

 

How do I show just the 
"Related items (by tag)"?

 

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

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 2 months ago #98692 by Odin Mayland
Considering the lack of comments, I have to assume that I am doing something wrong.

 

Can someone please answer my seemingly dumb question?

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

More
13 years 2 months ago #98693 by matthew turner
Hi Modernmagic,

Just tested this and related items display correctly with all of the author options switched off...including the "written by" bit.(k2 2.5SVN)

I have looked at the default template code for item display and the related items code section does not seem to be wrapped in a PHP "if....end if" check for author block display....

So the template that you are using has been customised, it may have the related items section inside the Author block dsiplay check - which is just above the related items bit in the template :

<?php if($this->item->params->get('itemAuthorLatest') && empty($this->item->created_by_alias) && isset($this->authorLatestItems)): ?>

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

More
13 years 2 months ago #98694 by matthew turner
Hi,

I had a bit more time on my hands to see if I could help, as it is a feature of K2 I have not had the need to use yet and tend to switch it off at the begining of a new website....

One by one I switched all of the item display options to not display - apart from "related items by tag", and the number of Related items to display (5)

I refreshed the browser between each individual option switched off, until Related Items by tag was the only thing displayed on the Item page !!

Points to note - this is a local test server, there is only one "author", the items I have used are within the same K2 category - this may be a factor ?

Good luck!

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

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 2 months ago #98695 by Odin Mayland
You are correct sir!    This is the first template I have tried to modify a template.  I indeed see that the "related items" code is inside the div for the the author.

 

This is the template I started with:  k2joom.com/k2-templates/rounded-k2joom-template/about-rounded

 

I will have to try editing the item.php after hours when my client is not likely to check the site, if I mess anything up.

 

Thank you for all your effort and help on this site:   www.primocraft.com/

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

More
13 years 2 months ago #98696 by matthew turner
Hi,

I would recommend using Jiliko.net K2 Template Admin for editing K2 template over rides, this allows you to create a new k2 template quickly (either by copying your existing "almost" k2 template for you or the K2 default one), assign it to a category, edit it, test it, then switch the assign back once you know where the code error/issue is.... then use the same process to edit the "almost" there template with your modified bit (or the understanding of where to cut and paste...!!).

Using the above method, you can just switch it back to the "almost" template at anytime...

 

 

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

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 2 months ago #98697 by Odin Mayland
OMG!!!!  LOL!!!!   I just paid for a subscription to jiliko and the Admin Template ext is awesome!!!  I have used some of his free ext and couldn't do without them.

Thanks!


mat said:

Hi,

I would recommend using Jiliko.net K2 Template Admin for editing K2 template over rides, 

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

More
13 years 2 months ago #98698 by matthew turner
Hi,

Amazing isn't it...!

Using this with the template over rides that you can now asign by category... plus the extra custom css it allows you to add too..

Best subscription money I've spent - saved hours and hours too, and its helped me to learn lots along the way !

Off subject, try out Jiliko's Alpha template - a-z sorting of K2 items in the front end! (downloadable for paid subscription - in the forum - worth it alone for for the subscription - also searchable extra fields - Sherpa - WOW!)

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

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 2 months ago #98699 by Odin Mayland
I can't wait to try sherpa.   I don't know if it will help but I want to be able to place code in an extra field so that it can be applied to all items in a category.

 

Currently, the code only works if I paste it into the item editor.  If I paste it into the extra fields editor, the code gets messed up.

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

More
13 years 2 months ago #98700 by matthew turner
Hi,

An alternative would be to create a k2 template for the category that you want to display the extra field info, create a module with the required info in it (instead of using the extrafield?), and then call the module within the k2 template code... this module would then display on all of the items within this category - and only the categories you select to use the template....if you need fuller instructions let me know

I do not know the answers,or the reasons why this happens (stripping of html tags within the extra fields editors)

I do remember trying to find a fix but got distracted..... which happens. !

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


Powered by Kunena Forum