0

I want to implement the option to allow users to create dynamic pages in my codeigniter project. I should give a grid system and custom widgets user will drag and drop these widgets then save it.I am planing to use gridster.js ( http://dsmorse.github.io/gridster.js ) .I want to export the json output from gridter.js ,save it to mysql db then generate pages from this saved json. Also provide option to edit these later. Can anyone help me?

Sukesh
  • 31
  • 1
  • 6

1 Answers1

0

In your views under

<script> 

    var gridsterdata = gridster.serialize(); // To export JSON data from gridster

    $.ajax({
        type: "POST",
        url: "yourphpfile.php", // Saving data to db from gridster
        data:{ data: gridsterdata }, 
        success: function(data)
        {
            console.log(data); // Or do like After saving data retrieve from here and show
        }
    })
</script>
  • Thanks for the reply.How to generate html from these gridsterdata? That means i want to show real html pages from the saved serialize data – Sukesh Oct 25 '17 at 06:57