Add Front End Functionality to Mura Plugins By: Greg Moser

While developing new plugins for mura, my CMS system of choice, I decided that there was some need for front end integration.  Basically I came up with a simple way to add tools to the front end toolbar of Mura using jQuery.  Here is a sample of the code that needs to be placed somewhere in your template.

 

$(document).ready(function(){
	
	var OriginalToolbar = $("#frontEndTools ul").html();
	var PluginToolbar = 
		"<li id='WeldTools'><a href=''>Plugin Tools</a>" +
			"<ul>" +
				"<li id='EditProduct'><a href=''>Tool Option A</a></li>" +
				"<li id='EditProduct'><a href=''>Tool Option B</a></li>" +
			"</ul>" +
		"</li>";
	var NewToolbar = OriginalToolbar + PluginToolbar;
	
	$("#frontEndTools ul").html(NewToolbar);
};

 

Post a Comment
  1. Leave this field empty

Required Field