Hello, Trongate community! We've got some exciting news to share about our beloved Trongate MX. We've just rolled out a significant upgrade that takes the already powerful mx-after-swap attribute to new heights. But before we dive into the details, let's address a few important points.

Documentation Rewrite in Progress

First things first: we owe you an apology. We know many of you have been eagerly waiting for updated documentation. Rest assured, a complete rewrite is in progress. It's a massive undertaking, and one of the reasons for the delay is our relentless pursuit of perfection for Trongate MX. We appreciate your patience and promise it'll be worth the wait!

Trongate: Leading the Pack in Improvements

While we're on the subject of updates, let's take a moment to pat ourselves on the back (just a little). As far as we know, Trongate continues to be the most frequently improved and updated of all leading PHP frameworks. We're not just talking minor tweaks here and there – we're constantly pushing the boundaries of what's possible with PHP and web development.

Serious About Being the Best

Now, we know our homepage might give you a chuckle with its slightly ridiculous tone. But make no mistake – behind the humor lies a dead-serious commitment to making Trongate the greatest PHP framework ever! Every update, every new feature is a step towards that goal.

Introducing the Enhanced mx-after-swap

And speaking of new features, let's talk about the star of the show: the upgraded mx-after-swap attribute in Trongate MX. This powerful feature just got even better, offering more flexibility and control over your post-swap operations.

Key Enhancements:

  • Multiple Function Invocation Styles: Whether you prefer concise or explicit syntax, we've got you covered.
  • Automatic Event Object Inclusion: Access event details without extra code.
  • Custom Argument Support: Pass specific data to your after-swap functions with ease.
  • Improved Error Handling: We've added robust error checking to help you debug more effectively.

But why tell when we can show? Check out this example:

<button mx-get="api/data" mx-target="#result" mx-after-swap="processData('user', 123, true)">Load Data</button>

<script>
function processData(dataType, id, isNew, event) {
    console.log('Data type:', dataType);
    console.log('ID:', id);
    console.log('Is new?', isNew);
    console.log('Triggered by:', event.target);
    // Process the new data...
}
</script>

In this snippet, we're passing custom arguments to our after-swap function, and the event object is automatically included. It's that simple!

Dive Deeper

Excited to learn more? We've got you covered! Head over to our newly updated documentation page for mx-after-swap at https://trongate.io/docs/trongate-mx/after-swap-operations.html. There, you'll find detailed explanations, more examples, and best practices for leveraging this powerful feature.

What's Next?

As always, we're not resting on our laurels. We're already hard at work on the next set of improvements and features. Your feedback and ideas are crucial in shaping the future of Trongate, so keep them coming!

Remember, with Trongate, you're not just choosing a framework – you're joining a revolution in PHP development. Let's continue to build amazing things together!

Happy coding, Trongate community!