Skip to Content Skip to Menu

SOLVED: GJ: Meta description on GroupJive Group pages.

  • NFA
  • NFA
  • OFFLINE
  • Posts: 84
  • Thanks: 15
  • Karma: 0
8 months 3 weeks ago - 8 months 3 weeks ago #337332 by NFA
Hi,

To set <meta description... in the header from profile pages, I use the Krileon solution from www.joomlapolis.com/forum/153-professional-member-support/228908-solved-how-to-manage-seo-meta-tags-easily?start=6#260955

Now I want to use a same kind of CB AutoAction - code - header for the GroupJive pages.
But what is the way to truncate the first 50 chars from [var2_description]? I don't think I can use a CB Query Field to query for it. I only see an option, which is not easy for me, in using the parameter field, but I already exploit the parameter field inhumanely for other purposes that it is becoming quite a jungle. Is there a simpler and less system-intensive option for something so basic in GroupJive?

Some CB substitution like below would be nice ;-)
Code:
left([var2_description],50)


With kind regards, Noa
Last edit: 8 months 3 weeks ago by NFA.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
8 months 3 weeks ago #337339 by krileon
You can do that with Format Functions. Enable them under the Parameters tab. You can review the available format functions, with explanations, and examples at the bottom of the Parameters tab. The below for example would truncate to 50 characters.
Code:
[cb:parse function="extract" length="50"][var2_description][/cb:parse]


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.

  • NFA
  • NFA
  • OFFLINE
  • Posts: 84
  • Thanks: 15
  • Karma: 0
8 months 3 weeks ago - 8 months 3 weeks ago #337399 by NFA
Hi Kyle,

I just can't get it to work on that way.

If I put in a CB AutoAction - Code - header
Code:
<meta name="description" content="[cb:parse function="extract" length="50"][var2_description][/cb:parse]" />
or
Code:
<meta name="description" content=[cb:parse function="extract" length="50"][var2_description][/cb:parse] />

I get in the source of the pages:

<meta name="description" content="[cb:parse function="extract" length="50"]Full, unlimited length of the variable [var2_description].
[/cb:parse]"

Tried also some other variants with double and single quotes, but can't get the CB parse function executed.

The "[cb:parse function=..." substitution doesn't seem to work in an CB Auto Action - Code - Header

Any idea why?
Regards, Noa
Last edit: 8 months 3 weeks ago by NFA.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
8 months 3 weeks ago #337401 by krileon
The following should work fine.

Method: Metadata
Key: description
Value:
Code:
[cb:parse function="extract" length="50"][var2_description][/cb:parse]

Recommend using the metadata method as you won't need to provide the full HTML just the necessary information. You need to also be sure you've enabled "Format Functions" under the Parameters tab as well or that format function won't do anything.


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.

  • NFA
  • NFA
  • OFFLINE
  • Posts: 84
  • Thanks: 15
  • Karma: 0
8 months 3 weeks ago #337427 by NFA
Yes, format functions wasn't enabled, and I didn't know there was metadata method as I created this AutoAction many years ago ;-) Thank you!
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum