Writing Code
This section aims to provide you with detailed guidance on how to write, structure, and manage code effectively when developing with our plugin.
Topics Covered
-
The window.yui Object
- Description: Learn about the
window.yuiobject, which acts as a central hub for all JavaScript interactions within the plugin. - Usage: How to initialize and use the
window.yuiobject in your projects.
- Description: Learn about the
-
Building URLs in JavaScript
- Description: Understand how to dynamically construct URLs using JavaScript.
- Usage: Techniques and best practices for building URLs that work seamlessly with your Craft CMS setup.
-
Using fetch()
- Description: A guide to using the
fetch()API for making asynchronous requests. - Usage: Examples of fetching data from your Craft CMS endpoints and handling responses.
- Description: A guide to using the