-
Notifications
You must be signed in to change notification settings - Fork 6
Event Reference
Triggered when a post is selected. The event will send an object containing:
-
slug- the slug of the post; -
post- the Post model corresponding to the clicked post in the collection.
Triggered when a category is clicked. The event will send an object containing:
-
id- the id of the category; -
slug- the slug of the category; -
type- always set to "category".
Triggered when a tag is clicked. The event will send an object containing:
-
id- the id of the tag; -
slug- the slug of the tag; -
type- always set to "post_tag".
Triggered when an author is clicked. The event will send an object containing:
-
id- the id of the author; -
slug- the slug of the author; -
type- always set to "author".
Triggered when a taxonomy is clicked. The event will send an object containing:
-
href- the link of the clicked taxonomy.
Triggered when a link is clicked. The event will send an object containing:
-
href- the link of the clicked link.
Triggered when an author is clicked. The event will send an object containing:
-
slug- the slug of the author; -
type- always set to "author".
Triggered when an category is clicked. The event will send an object containing:
-
slug- the slug of the category; -
type- always set to "category".
Triggered when an tag is clicked. The event will send an object containing:
-
slug- the slug of the tag; -
type- always set to "post_tag".
Triggered when a taxonomy is clicked. The event will send an object containing:
-
href- the link of the taxonomy.
Triggered when a link is clicked. The event will send an object containing:
-
href- the link of the clicked link.
Triggered when the next button is clicked. The event will send an object containing:
-
page- the number of the next page.
Triggered when a given page is clicked. The event will send an object containing:
-
page- the number of the page that was clicked.
Triggered when the previous button is clicked. The event will send an object containing:
-
page- the number of the previous page.
Triggered when the cancel button is clicked. The event will not send any data.
Triggered when a reply is posted. The event will send an object containing:
-
content- the content of the reply; -
post- the reply's post; -
parent_comment- the ID of reply at which the posted comment is replying (if any); -
author- a User model containing the data of the reply's author.
Triggered when the search box is empty. The event will not send any data.
Triggered when a submit event is made by the user. The event will send an object containing:
-
search- the keywords of the search box.
Triggered when the user starts typing on the search box. The event will send an object containing:
-
search- the search terms written on the search box.
Triggered when the a link is clicked. The event will send an object containing:
-
link- the link of the clicked link.
Triggered when the header is clicked. It will send an object containing
-
id- set to -1. This is merely informative for theMenuItemViewto deselect any selected resource.
Triggered when a link is clicked. It will send an object containing:
-
link- the link of the clicked resource.
Triggered when a link is clicked. It will send an object containing:
-
id- the ID of the clicked resource; -
parent- indicates the ID of the parent of the clicked resource.
Triggered by the HomeAPI or the SingleController when the page_on_front is set to the post archive. The event will send an object containing:
-
paged- the number of the page to display.
Triggered by the HomeAPI when the page_on_front is set to a given post or page. It will send an object containing:
-
id- the id of the page or post.
Triggered when the next button is clicked. It will send an object equal to the one sent by PaginationView.
Triggered when the previous button is clicked. It will send an object equal to the one sent by PaginationView.
Triggered when a page is clicked. It will send an object equal to the one sent by PaginationView.
Triggered when a comment is successfully posted. The event will send a Comment model.
Triggered when a user clicks in the cancel button. The event will send an object containing:
-
id- if the reply form is displayed to reply to a post, this will be 0. If the reply form is displayed to reply to another reply, this will contain the ID of that reply.
The following events will only be triggered when used alongside the BaseController and LoadingController mechanism. None of them return any results, as the results are used in the callbacks provided by the Controller that began the process.
Indicates when a fetch is starting.
Indicates when a fetch is successful.
Indicates when a fetch fails.
Indicates when a save is starting.
Indicates when a save is successful.
Indicates when a save fails.
Indicates that there will be a navigation (changing browser page content). The event will send an object containing:
-
route- the route to which the navigation will go; -
options- an object containing:-
trigger- true or false, indicating if Backbone will trigger the route (automatic navigation) or not.
-
Indicates that the title will change. It will send a string with the new title.