Support Forums

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

Your Time: Our Time:

SpType Icon

Featured Lock Resolved Issue
Hey. Before SPPB 2, you could use your custom field type for example the administrator \ components \ com_sppagebuilder \ builder \ types \ select.php
Now SPPB 3, there is no such possibility how to write the custom type of a field?
What's wrong with the code?

<?php
class SpTypeMenuitems{

static function getInput($key, $attr)
{
if(!isset($attr['std'])){
$attr['std'] = '';
}
//print_r($attr['std']);

// Depends
$depend_data = '';
if(isset($attr['depends'])) {
$array = array();
foreach ($attr['depends'] as $operand => $value) {
if(!is_array($value)) {
$array[] = array(
$operand,
'=',
$value
);
} else {
$array = $attr['depends'];
}
}

$depend_data = " data-depends='". json_encode($array) ."'";
}

// multiple
$multiple = false;
if(isset($attr['multiple'])) {
$multiple = 'multiple';
}

$output = '';
$output .= ''.$attr['title'].'';

$output .= '';
$menuitem = MenusHelper::getMenuLinks();

$items = array();
$selected = '';
if(!$multiple)$output .= 'Select Menu';

foreach ($menuitem as $key => $item) {
//print_r($item);
$items[$key] = new stdClass();
$items[$key]->title = $item->title;
$items[$key]->menutype = $item->menutype;
$items[$key]->id = $item->id;
$output .= '';
$kitems = array();
foreach ($item->links as $k => $kitem) {
//print_r($kitem);
$kitems[$k] = new stdClass();
$kitems[$k]->value = $kitem->value;
$kitems[$k]->level = $kitem->level;
$kitems[$k]->text = $kitem->text;
$output .= ''.$kitems[$k]->text.'';
}
$output .= '';
}

$output .= '';

if( ( isset($attr['desc']) ) && ( isset($attr['desc']) != '' ) )
{
$output .= '<p class="sp-pagebuilder-help-block">' . $attr['desc'] . '
';
}

$output .= '';

return $output;
}

} ?>

3 Answers

Toufiq - Staff

One week ago #Permalink
Hi there,

Good morning. Sorry to say that, No more custom input or override, It has been stoped this feature in this version.

-Thanks
The counter question, how then to use for example the custom font of icons and what would it be displayed in the admin panel, do not all use the fonthouse?
Hmm, how oddly it turned out, abandon version 3.0, which in everything seemed better, but then such a jamb

Toufiq - Staff

6 days ago #Permalink
Hi, You can achieve this way.

https://prnt.sc/hj8wv8

Output will be as like
https://prnt.sc/hj8x8m

-Thanks


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: 141
Toufiq

Toufiq

Total Accepted Answers: 48
Shibbir

Shibbir

Total Accepted Answers: 25
Pavel

Pavel

Total Accepted Answers: 4
Rodrigo Corbata

Rodrigo Corbata

Total Accepted Answers: 3

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