Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

Name of the file and not link in Custom HTML

  • glenanPL
  • glenanPL
  • OFFLINE
  • Posts: 50
  • Thanks: 2
  • Karma: -1
7 years 11 months ago #290670 by glenanPL
Hi
With CB, I have some fields with type: File (like cb_cv).
I want in another field (Custom HTML) to show the name of the file without link.
If I use [cb_cv] or [cb:userdata field="cb_cv" /]
CB show the URL of the file, for downloading if connected, like mysite.com/profile-view/fieldclass.html?field=cb_cv&function=download&user=62&reason=profile ,
but not the name of the field.
Someone can help me?
Is there somewhere more documentation than:
www.joomlapolis.com/documentation/18353-using-substitutions-throughout-cb
Regards & thanks in advance
PL

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

  • glenanPL
  • glenanPL
  • OFFLINE
  • Posts: 50
  • Thanks: 2
  • Karma: -1
7 years 11 months ago #290686 by glenanPL
Replied by glenanPL on topic Name of the file and not link in Custom HTML
I have find a solution, not very good, but it’s OK
I create a Query Field cb_cvfile with
Code:
SELECT `cb_cv` FROM `#__comprofiler` WHERE `user_id` ='[user_id]';
And in my HTML field, I can now use [cb_cvfile] B)
If someone have a better solution?
Regards

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
7 years 11 months ago #290699 by krileon
Replied by krileon on topic Name of the file and not link in Custom HTML
There's no substitution for just the name of the file. Is there a reason you need just the name of the file?


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.

  • glenanPL
  • glenanPL
  • OFFLINE
  • Posts: 50
  • Thanks: 2
  • Karma: -1
7 years 11 months ago #290707 by glenanPL
Replied by glenanPL on topic Name of the file and not link in Custom HTML
Hi Kyle,
With another server, we create a “pdf generator” which use MS Word document for pdf creation with variables in the doc.
In CB we create an html field “print the profil”.
The button transfer parameters to the pdf server and the user receive a pdf (with the field formatting with the word document), completed with field file like CV.
If we use the URL mysite.com/profile-view/fieldclass.html?field=cb_cv&function=download&user=62&reason=profile
The pdf generator can’t use the link, because it’s not connected in CB :-(
With the URL like
mysite.com/images/comprofiler/plug_cbfilefield/ [user_id]/[cb_cvfile]
It’s ok for the first tests ;-)
But if there is something more simple, it will be OK!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
7 years 11 months ago #290712 by krileon
Replied by krileon on topic Name of the file and not link in Custom HTML
Sounds like an issue with the PDF generator. I'm not sure why it can't handle the non-direct URL. By default downloads are served as inline header unless you've Force Download enabled in which case they're served as attachment header. Maybe your PDF generate needs attachment header?


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