May 2017
Beginner to intermediate
536 pages
14h 25m
English
Here, we come to the most exciting part of working with Backbone.js inside WordPress. Defining the models, views, and collections are a major part of working with Backbone.js. Let's plan the structure before we get into the implementation.
The forum member profile should contain a list of topics created by the member. So the model in this scenario is Topic and the collection will be topics. The list of topics needs to be loaded as a dynamic table, and hence, we need a view/template for the topics list. First, we need to define these three components to get started with Backbone.js. Let's start with the creation of a model, as shown in the following code:
jQuery(document).ready(function($){ ...Read now
Unlock full access