Keyword

K2 Content Module

  • Steve Vick
  • Steve Vick's Avatar Topic Author
  • Offline
  • New Member
More
11 years 4 months ago - 11 years 4 months ago #114012 by Steve Vick
K2 Content Module was created by Steve Vick
I have the content module set up on my home page to show "featured" items. It works just fine. When a user clicks on the item it takes them to the item view page, which is fine.

But the problem is, I want the item view page to have specific side bars (like my main k2 page - click any item on this page and see the side modules: category list of items )

How do I assign modules to the item view of the content module? See links below for clarification:

Main page with random K2 content appearing at top right: awg2014.org
Click the item in the module and you will get the item view with no other content on the page (except the footers)

But I want the item view to look more like this: store item .
How do I get the side module to show on that the content module item links too?

Hope that all makes sense,
Thanks,
St

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 months ago #114013 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 Content Module
Hello Steve,

I clicked on the top right and got this URL - awg2014.org/component/k2/item/16-sledges

This means that these items do not belong to any menu items, therefore you cannot assign any modules to them. You have to assign its category to a menu item and assign these modules on that menu item.

If you want seperate modules in your item view and seperate modules in your item listing this a template issue, you should perform the appropriate checks in your template's index.php.

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

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

  • Steve Vick
  • Steve Vick's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #114014 by Steve Vick
Replied by Steve Vick on topic Re: K2 Content Module
Thanks so much for the reply and sorry it has taken me a few days to get back to this post. I do realize that the item would need to be a menu item to have modules assigned to it.

If you click the link below the random item that says "Raavee's Locker" (on the home page top right module position), it takes you to a page connected to a menu. (Here is the direct link: awg2014.org/raavees-locker .) All the items are connected to a menu and the modules on the right side remain there as you navigate through the items.

What I want is the actual random image that appears in the module on the front page (the K2 content module) to connect to the item that is assign to a menu.

But what I am gathering is that this K2 content module, when set to randomly display a feature item, does not have the ability to send users to the actual featured item that is connected to a menu. Which is too bad because I need the front page featured item to take visitors into the store. But instead it basically takes them to a blank page with only the featured.

It's actually a real simple concept but a bit hard to explain in a forum. Anyway if any one knows how to get this random featured item to work the way I am explaining, I would love to hear about it?

Thanks.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 3 months ago #114015 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 Content Module
Steve if I get this right you need a random item and/or image in your module but with a fixed link.

If you a have a basic understanding of coding that can be done quite easily.

First create a new override for your module, then go to your module's params and locate Custom link at the bottom. (it is at the end of the form). Fill it with a link or a menu item and finally enable it. end of part 1.

Now open your php file go near the end and locate the actual code that is inside the href="" attribute.
Copy this attribute and use it to replace the links you wish.

It might look like a hassle but trust me on this it is not.

More info on templating and overriding can be found here getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates (read this to locate the files you need).

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

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

  • Steve Vick
  • Steve Vick's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #114016 by Steve Vick
Replied by Steve Vick on topic Re: K2 Content Module
It's not quite a fixed link I am looking for because the random item has to link to the correct item.

Let's say the content module randomly shows hockey pucks. That image links to this page: awg2014.org/component/k2/item/49-hockey-pucks

But the hockey puck page is: awg2014.org/raavees-locker/itemlist/category/9-hockey .

What I am gathering is that K2 does not have the ability to link the random item in the module to the corresponding item that already exist (with modules and menus on the right).

A fixed link would bring me to the same page all the time. That is not what I want. I want to be able to place modules on the page that the random item in the content module links to. But thee module it doesn't link to a menu item (just the component.)

I know a good bit of coding (this isn't my first rodeo) so if there is a coding fix that need to happen I will have at it. But I don't think I made what I want clear. I hope this better explains it.

Thanks.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 3 months ago #114017 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 Content Module
Steve the second link you posted is a category link not an item link (hence the /itemlist/category in the URL).

To achieve this you simply replace the title and image link href attributes with the one of the category.
(<?php echo $item->categoryLink; ?>).

As far as the modules on the right, this is a template specific issue, I am sure the template developer will be able to provide you with the info you need.

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

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

  • Steve Vick
  • Steve Vick's Avatar Topic Author
  • Offline
  • New Member
More
11 years 3 months ago #114018 by Steve Vick
Replied by Steve Vick on topic Re: K2 Content Module
Oh my - actually I totally pasted the wrong link for the second one. My bad. BUT we are on to something.

What a user gets when they click an item in the module is this:
awg2014.org/component/k2/item/49-hockey-pucks

And what I want is this (this time it is the right link):
awg2014.org/raavees-locker/item/49-hockey-pucks

So what I need to know is how to switch "component/k2/" and make it "raavees-locker/" in the url. Also, I need to know what file to do this to and where in the file to do it?

Do you know what code I have to replace and where it is?

Thanks so much for your patience on this. And again, sorry for the bad link above. I didn't click on the item in the category - and as you pointed out - ended up pasting the link to the category instead of the item.

Anyway... I think we are almost there. Thanks.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 3 months ago #114019 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 Content Module
Ok,

I get it now. There is a possible conflict with your menu items setup.

All of your subcategories do not belong to a menu item. That's why you are getting component/k2 URLs.

You have to map all of your subcategories (like this one awg2014.org/component/k2/itemlist/category/1-apline-skiing ) in menu items. It doesn't matter if they are not in the main menu as long as the are mapped in a menu.

Ps. You might have to republish some modules on these items after you have completed your new menu structure.

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

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

  • Steve Vick
  • Steve Vick's Avatar Topic Author
  • Offline
  • New Member
More
11 years 2 months ago #114020 by Steve Vick
Replied by Steve Vick on topic Re: K2 Content Module
It has been a long time since I have visited this issue. And if you don't feel like trying to help anymore, I understand. I have pretty much given up on the idea that this is going to work like I need it.

If I put all the items in a menu, how will the K2 Content Module show them any different. Doesn't it select items from the a category list?

Anyway. I am moving on. Not sure how anyone gets random items to show up on a page with any modules in the sidebar. Must be some magic I just don't have.

Thanks for trying.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 2 months ago #114021 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 Content Module
By mapping content in menus. Each category -> 1 menu item you make sure you won't get urls like /component/k2.

If your category doesn't belong to menu item, you will get the modules and the url of the menu item you are currently visiting. This means that if you haven't set up your menu structure correctly the K2 Content mod will provide urls and links base on the current menu item. This is how Joomla!'s router works.

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