30% discount! It’s a Halloween treat! Details

Support Forums

Support Online : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

Helix 2.1.7 - Shortcodes

Featured Lock Resolved Bug
Hey guys i updated my helix ii to 2.1.7 today and i select 'prepare content' for all modules using shortcodes but i also have shortcodes inside some k2 articles which i cant seem to get to work now, is there some trick to this one?

6 Answers

Kawshar Ahmed - Senior Staff

More than a month ago #Permalink
We are sorry to inform you that shortcode only works joomla article and custom html module. But, you can implement the shortcode for any content if you wish. Here I am giving you an example how to implement with K2 single item.

First of all open the item.php file from "components/com_k2/templates/default/" folder and look for the suitable output code where you want to see shortcodes working. For example look for the code
<?php echo $this->item->fulltext; ?>

Now replace that code with below code

<?php
if( function_exists('do_shortcode') )
{
echo do_shortcode( $this->item->fulltext );
}
?>


Note: If you are using any of our template that comes with K2 support then the template path will be templates folder and "html/html/com_k2/templates/default/".

Thanks

Cameron James

More than a month ago #Permalink
Also, another fix for you guys, in the file core/helix.php

self::getInstance()->document->addStyleSheet("http://fonts.googleapis.com/css?family="; . $name); <-- this create error when using ssl, no google font will load.

self::getInstance()->document->addStyleSheet("//fonts.googleapis.com/css?family=" . $name); <- if change it to this, very simple fix, just remove the http: google font will render no matter if http or https.

Cameron James

More than a month ago #Permalink
You know these shortcodes cause so much problem lol, can i make a suggetsion for helix, get rid of the wordpress shortcode code and use an implementation of Mustache for php, im sure there are dozens around. will prob solve all ur problems!

Cameron James

More than a month ago #Permalink
Thanks brother, i will give this a shot, i did have it working inside k2 article previous to the update i just totally forgot what i had done to make it work now a few month later, i wil try hard to remember :)

reza

More than a month ago #Permalink
لطفا اضافه کنید فیلد جدید در پلاگین
Please add new field in the plugin plg_xtd_helix_shortcode_generator

Attachments (2)

  • 111.jpg
    111.jpg 61.5 KB
  • 222.jpg
    222.jpg 148.2 KB


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Leaderboard (30 days)

Paul Frankowski

Paul Frankowski

Total Accepted Answers: 167
Sifat

Sifat

Total Accepted Answers: 101
Toufiq

Toufiq

Total Accepted Answers: 74
Pavel

Pavel

Total Accepted Answers: 4
SS

SuperSys IT Services

Total Accepted Answers: 2

100+

Templates

200,000+

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us