diff --git a/e107_core/shortcodes/batch/page_shortcodes.php b/e107_core/shortcodes/batch/page_shortcodes.php
index 4d61f86b6..fd093e1bd 100644
--- a/e107_core/shortcodes/batch/page_shortcodes.php
+++ b/e107_core/shortcodes/batch/page_shortcodes.php
@@ -249,6 +249,12 @@ class cpage_shortcodes extends e_shortcode
return ''.$this->sc_cpagetitle().'';
}
+ /**
+ * @param null $parm
+ * @example {CPAGEBUTTON}
+ * @example {CPAGEBUTTON: class=btn large default mb&target=blank}
+ * @return string
+ */
function sc_cpagebutton($parm)
{
$tp = e107::getParser();
@@ -290,7 +296,10 @@ class cpage_shortcodes extends e_shortcode
$inc = ($size) ? " btn-".$size : "";
- return ''.$text.'';
+ $class = (!empty($options['class'])) ? $options['class'] : 'cpage btn btn-primary btn-cpage';
+ $buttonTarget = (!empty($options['target'])) ? ' target="'.$options['target'].'" ' : $buttonTarget;
+
+ return ''.$text.'';
}