Display user overview

2 months 5 days ago #317391 by dklotz
Hello,

on my website, exhibition participants can register for the fair and they must give details like size of exhibition stand and if they need additional equipment (chairs, tables) or water- and energy supply.
The admins of my site should have the option to display an overview for each participant and to print this information.

With CB_AutoActions it is possible to display CB-fields in a Joomla article (i.e. [cb_companyname] ).
I managed to set up an article where the desired information is shown. However, it is restricted to the information of the current logged-in user.
Is there a way to make a list of the participants, and - when I click a company name - display the relative cb-fields content of the relative company?


Thanks,
Dirk
2 months 4 days ago #317418 by krileon

With CB_AutoActions it is possible to display CB-fields in a Joomla article (i.e. [cb_companyname] ).

No, for that you need to use CB Content Bot which enables substitutions anywhere Joomla content prepare is used (e.g. in Joomla articles).

I managed to set up an article where the desired information is shown. However, it is restricted to the information of the current logged-in user.

Correct, for what you're wanting you'd need a Joomla article per user with them assigned as the owner of the article since substitutions in articles are based off the article owner or the viewing user.

Is there a way to make a list of the participants, and - when I click a company name - display the relative cb-fields content of the relative company?

Yes, you can use a Code action in CB Auto Actions with Triggers set to None. Next set Method to HTML. You now have a custom page that supports substitutions. The URL to your auto action is provided under the Global tab of the auto action. Example as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID_HERE

Any substitutions in your auto action however will be based off the displayed user. To change this simply set &users=USER_ID_HERE in the URL so it outputs substitutions of the user you're wanting. Example as follows.

index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID_HERE&users=USER_ID_HERE

You can then use this in a Custom HTML field for example that you can display on a userlist for easy linking. Example as follows.

<a href="index.php?option=com_comprofiler&view=pluginclass&plugin=cbautoactions&action=action&actions=ACTION_ID_HERE&users=[user_id]" target="_blank">Details</a>

I strongly recommend you set the Access for the auto action to Moderators Only though to prevent regular users from reaching that page. I suppose you could also just put this information in a Custom HTML field and display it on a userlist as well.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: dklotz
2 months 4 days ago #317437 by dklotz
Hello Krileon,

thank you very much for your answer.

With CB_AutoActions it is possible to display CB-fields in a Joomla article (i.e. [cb_companyname] ).

No, for that you need to use CB Content Bot which enables substitutions anywhere Joomla content prepare is used (e.g. in Joomla articles).

Oh yes, of course - sorry for the confusion!

Correct, for what you're wanting you'd need a Joomla article per user with them assigned as the owner of the article since substitutions in articles are based off the article owner or the viewing user.

This is pretty cool! Thanks for the hint! I'll keep this in mind for future development!

In the meantime I found a different solution:
I defined a CB field, type custom HTML, with the desired fields as contentbot fields in a table. Then I set up a new list for admin access only, with just one column and two fields "company name" and "custom HTML", enabled search and set paging to 1. In this way all the needed information for admins is displayed on one page per company. Admins now easily can find the exhibition participants they are looking for and the formatting for the print output is defined with css "@media print".
Perfect for our needs!

Thanks again for your time and support!

Best regards,
Dirk
The following user(s) said Thank You: krileon
Moderators: beatnantkrileon
Time to create page: 0.392 seconds

Facebook Twitter LinkedIn