GetSimple Support Forum

Full Version: Shortcode in sidebar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I would like to use shortcode for a excerpt plugin in the sidebar, but getsimple removes it. Looks like only html is allowed.

How can I override it?
Confused
If I understand correctly, you already have a plugin that will throw you excerpts with the use of a shortcode, but the excerpt does not appear?

Second question, what exactly do you mean by "shortcode"? A php style shortcode consisting of <? ?> or some {mustage-like} tag?
The shortcode looks lie this:

(% excerpt :portfolio, 340, html %)

It does not show up in the temple.

Is there an easy way to change this?
As far as I know shortcodes/tags are only processed as long as they appear in the content field of the page. Eventually in other fields of the page as long as plugin supports it.

Shortcodes/tags won't work when placed in components or raw in template files.
(2014-01-11, 07:50:00)Klas Wrote: [ -> ](% excerpt :portfolio, 340, html %)

Are you using the Pages Excerpts plugin?
If so, it can be used with a function in the template or components. I think it would be like:

PHP Code:
<?php echo page_excerpt('portfolio'340'html'); ?>
(2014-01-11, 19:51:42)Carlos Wrote: [ -> ]
(2014-01-11, 07:50:00)Klas Wrote: [ -> ](% excerpt :portfolio, 340, html %)

Are you using the Pages Excerpts plugin?
If so, it can be used with a function in the template or components. I think it would be like:

PHP Code:
<?php echo page_excerpt('portfolio'340'html'); ?>
Thank you for your response, that will do it for the excerpts, but I have also an other problem, a mp3 plugin, who have the same syntax in its short-code. My bee that is not possible then, to use the short-code.
Which plugin?
Nevermind, I suppose it's the Mp3 Plugin Extended.

Try inserting something like this in your sidebar:
PHP Code:
<?php echo exec_filter('content','(% mp3:yourfile.mp3 %)'); ?>
(2014-01-15, 02:22:37)Carlos Wrote: [ -> ]Nevermind, I suppose it's the Mp3 Plugin Extended.

Try inserting something like this in your sidebar:
PHP Code:
<?php echo exec_filter('content','(% mp3:yourfile.mp3 %)'); ?>

Thanks for your help, great!

The thing is that the file are going to bee change regularly (newest program), so I think it have to bee some hack on the default regulation for the sidebar, so the short-code will function.
Ok, I got a solution for this.

Added this code to the template and added a site with the slug name latest.

PHP Code:
getPageContent('latest'); 

Thanks every one for your time and help!

The site so far
If I need to stick small arbitrary php code in my site. I use my component hook plugin.
(2014-01-17, 00:25:09)shawn_a Wrote: [ -> ]If I need to stick small arbitrary php code in my site. I use my component hook plugin.

Thanks, but I almost build my own template anyway, so I stick with my solution.