Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 653 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Visual Composer custom shortcode template - custom_markup display user input

#1
I have created some shortcode elements. Now I want to customize the look of the elements in the backend editor.

From the [description][1] of the wiki of VC-Pagebuilder, I get out that I can use the "custom_markup" param for this.

For simple html it works fine. But I can not display the user input in the shortcode backend element.

<?php
add_shortcode('simpletext', 'simpletext_shortcode');
add_action('vc_before_init', 'simpletext_vc');

// Frontend output

function simpletext_shortcode($atts, $content = '') {
ob_start();
set_query_var('content', $content);
get_template_part('components/content', 'simpletext');
return ob_get_clean();
}

// Backend
function simpletext_vc() {
vc_map(array(
"name" => "Einfacher Text",
"base" => "simpletext",
"class" => "",
"icon" => get_template_directory_uri() ."/images/vc_icons/simpletext_icon.png",
"custom_markup" => '{{ content }}', // try to display the user input
"category" => "Text",
"params" => array(
array(
"param_name" => "content",
"heading" => "Inhalt",
"description" => "Inhalt des Elements.",
"holder" => "div",
"type" => "textarea_html"
)
)
));
}
?>

I 'm grateful for any help .


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through