Skip to Content Skip to Menu

Profile Fields Available to Prepared Content?

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
3 years 11 months ago #321726 by bascherz
I have a Custom HTML field that uses a module I wrote that grabs specific data from the database. I am trying to pass to it the [user_id] value from the profile of the person the module is being loaded into. The Custom HTML looks like the below.
Code:
This is a summary of my outstanding meal requests and their current statuses. {loadposition my-matches-module} 

Is there any way the module code can be modified to receive the profile object so that fields from it can be used in the module? This would be truly awesome. Maybe there's a CB method the module can instantiate to create the object?

If not, maybe there is a way I can replicate what this very simple module does right in a Code field? The output of the code field would have to be HTML. That would not be ideal, but it might be my only option.

Thanks in advance,
Bruce

Bruce S - Vienna, VA

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

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 228
  • Thanks: 29
  • Karma: 11
3 years 11 months ago #321727 by bascherz
Replied by bascherz on topic Profile Fields Available to Prepared Content?
Actually, I found it pretty easy to do what I needed with CB. I had no idea the Query output was so formattable. Mission accomplished!

But I'd still like to know if there's a way to get at the current profile from a module loaded into a Custom HTML field. It would come in handy at times.

Thanks!

Bruce S - Vienna, VA

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
3 years 11 months ago #321743 by krileon
Replied by krileon on topic Profile Fields Available to Prepared Content?

But I'd still like to know if there's a way to get at the current profile from a module loaded into a Custom HTML field. It would come in handy at times.

Nope, that would need to be coded into your module. Joomlas loadposition, loadmodule, and loadmoduleid shortcodes do not allow for passing random data to modules like that.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
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 CST to 4:00 PM CST. 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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum