[SOLVED] how to manage seo meta tags easily ?

9 years 1 month ago - 9 years 1 month ago #260909 by joomlalala
Replied by joomlalala on topic how to manage seo meta tags easily ?
Thank you for your reply. Yes I understand, ..I have no other tracks

Here is my code :

Triggers : After Profile Display
Conditions : -
Action :
Method : Header
Code : <meta name="description" content= "[cb:parse function="extract" start="0" length="50"][cb_description][/cb:parse]"/>
Parameter :
Reload User : No
Exclude Users : -
Format Functions : Yes


For all profile edition whose this field [cb_description] contains few words, everything is ok.
As I said last post, page is not loaded if the field contains many word (about 250 carac. I think)
I did a few tests by directly editing the database field, it is the rule that seems to work here. Just repeat text 2 times, it breaks.
The field type is text area

Thank you
Bests Regards
Christine

Please Log in to join the conversation.

9 years 1 month ago #260955 by krileon
Replied by krileon on topic how to manage seo meta tags easily ?
Your issue is a limitation of PHP REGEX functions. Your string is too long for it. I recommend using a CB Query Field to query for the description and cut it short directly in the query. Then substitute in the query result. Example as follows.

Type: Query
Name: cb_description_short
Query:
SELECT SUBSTR( `cb_description`, 0, 50 ) FROM `#__comprofiler` WHERE `id` = '[user_id]'

Code:
<meta name="description" content="[cb_description_short]" />


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 to join the conversation.

9 years 1 month ago #260960 by joomlalala
Replied by joomlalala on topic how to manage seo meta tags easily ?
Thank you, it should work well :)
Bests Regards.
Christine

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.199 seconds

Facebook Twitter LinkedIn