- Posts: 38
COMMUNITY FORUM
Creating individual user pages
- oorzaak
-
Topic Author
- Offline
- Junior Member
I'd like to create a menu item that will show, for registered and logged-in users, their individual K2 and Joomla user details and a blog view of their K2 items. So I want to have one menu item that will accept the user id of a logged-in user as a parameter.
I've read several forum posts:
getk2.org/community/English-K2-Community/179671-How-to-configure-K2-for-multiple-user-blogs
getk2.org/community/English-K2-Community/199162-Menu-Item-Link-to-K2-Users-Blog#199197
Yet I do not understand how to transfer the user id either to a menu item (K2 user blog) or to a module (K2 user module). Hope this is possible at all.
Kind regards, Frits
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
These links you need are there by default.
Please Log in or Create an account to join the conversation.
- oorzaak
-
Topic Author
- Offline
- Junior Member
- Posts: 38
:whistle:
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Please Log in or Create an account to join the conversation.
- oorzaak
-
Topic Author
- Offline
- Junior Member
- Posts: 38
The K2_user module provides a very useful list of links for user related views. When trying to refine it to our needs I came across some questions.
Some information to start with: I created a menu item with an article in it; with loadposition the K2_user module is shown inside this article. So the module has a menu item. And I created a child menu item for editing the user account details. This is reflected nicely in the breadcrumb.
Question 1: it seems that, when selecting the user blog view from the module, the default K2 template is used and not my template override for this view. I cannot find an option for the module to use my override, would this be possible somehow?
Question 2: when selecting the user blog view from the user module, there is no menu item related to this view. This works fine but the lack of a menu item breaks my breadcrumb. Would there be a way to associate a menu item with this view?
Question 3: the K2_user module shows a count of the comments that were submitted by the user. However there is no listing of there comments, which makes it different from the other links in the module. I think the comments module does not provide a listing of the comments by a specific user either. Or did I miss something?
Kind regards, Frits
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Question 2: Yes, this is the same actually as the above question.
Question 3: This listing is only present for moderation. Not for the 'public' to see. The latest comments module does not indeed offer this functionality. You need to look for an extension at the JED.
Please Log in or Create an account to join the conversation.
- oorzaak
-
Topic Author
- Offline
- Junior Member
- Posts: 38
Krikor wrote: Question 1: Map that user into a menu item and you will have the option to use another K2 User (blog) menu item.
The problem is that I have a few hundreds of users so I will not be able to map them all to individual menu items.
Frits
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
This will enforce the new template to all users.
As for the breadcrumbs and urls; you can create a new K2 category menu and leave it blank. All the orphan tags and users will be rendered through this menu item.
Please Log in or Create an account to join the conversation.
- oorzaak
-
Topic Author
- Offline
- Junior Member
- Posts: 38
Just to make sure: you mean in the /components/com_k2 folder?Krikor wrote: Then you need to edit the default template of K2 and the user.php file.
About the menu: it works indeed, that's quite nice!
Frits
---
Edit: Just found out that the solution for the menu item also solved the template override issue. Because now there is a menu item in which the sub template can be set.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
The post I sent you explains how you can override the template of K2.
Please Log in or Create an account to join the conversation.
- oorzaak
-
Topic Author
- Offline
- Junior Member
- Posts: 38
When selecting a menu item, my template overrides are used.
But someone who knows that the site is made using K2, can also forge a url like this: .../component/k2/itemlist/user/948
In this case the default template is used, not my override.
I have a problem with that because I added some user access scripting to the overrides. So these can be easily bypassed. Would removing the default template from the /components/k2 folder solve this? And/or would this create new issues that I am not aware of?
Frits
---
Edit: our latest posts crossed.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
There is a small difference between K2 templates/ subtemplates and Joomla! templates.
If you only use one K2 subtemplate then you do not need to worry about this issue.
This cannot be changed without an SEO extension beacuse this is standard Joomla! functionality. The way these menus behave is how Joomla! menu items behave and not K2.
Finally this post will clarify K2 templates. It is definetely worth the read. nuevvo.com/blog/item/84-k2-inheritance-sub-templating
Please Log in or Create an account to join the conversation.