Use with page builders
-
Page builders are used more and more. So I added some code to this plugin to not only show “Edit” and “View”, but also “Build” what opens a page in the page builder mode.
Beginning at line 1113 of the function.php:
<p class=”cms_tpv_action_edit_and_view”>
‘ class=’cms_tpv_action_edit’><?php _e(“Edit”, “cms-tree-page-view”)?>
‘ class=’cms_tpv_action_build’><?php _e(“Build”, “cms-tree-page-view”)?>
‘ class=’cms_tpv_action_view’><?php _e(“View”, “cms-tree-page-view”)?></p>Beginning at line 446 of the cms_tree_page_view.js:
// setup link for view page
$view = div_actions_for_post_type.find(“.cms_tpv_action_view”);
var permalink = $li.data(“permalink”);
$view.attr(“href”, permalink);// setup link for build page
$build = div_actions_for_post_type.find(“.cms_tpv_action_build”);
var permalink = $li.data(“permalink”);
var permalink = permalink.substring(0, permalink.length – 1);
var permalink = permalink + “?fl_builder”;
$build.attr(“href”, permalink);// setup link for edit page
$edit = div_actions_for_post_type.find(“.cms_tpv_action_edit”);
var editlink = $li.data(“editlink”);
$edit.attr(“href”, editlink);
$edit.removeClass(“hidden”);I am not a coder, but this works for beaver builder. For elementor it should be &action=elementor (not tested).
- The topic ‘Use with page builders’ is closed to new replies.