Adding Mobilize Events to Your Duda Site
You can easily display your Mobilize events on your Duda site by adding custom HTML, CSS, and JavaScript. Follow these steps:
Go to your Duda Editor.
Navigate to Widgets → HTML (or drag an HTML widget onto your page).
Step 2: Add Your Code
Inside the HTML widget, paste the code as follows:
Note: This is sample code. Replace your_org_id_here and your_api_url_here with your own Mobilize organization ID and API endpoint.CSS (Styling your events)
Wrap this in <style> tags:
- <style>
- #mobilize-events {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
- gap: 20px;
- padding: 10px;
- }
- .mobilize-card {
- background: #ffffff;
- border-radius: 10px;
- padding: 20px;
- box-shadow: 0 4px 10px rgba(0,0,0,0.1);
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- }
- .mobilize-title {
- font-size: 1.2rem;
- font-weight: bold;
- margin-bottom: 10px;
- }
- .mobilize-date {
- font-size: 0.95rem;
- color: #444;
- margin-bottom: 8px;
- }
- .mobilize-location {
- font-size: 0.9rem;
- color: #666;
- margin-bottom: 12px;
- }
- .mobilize-button {
- background: #0057b8;
- color: white;
- padding: 10px 14px;
- text-align: center;
- border-radius: 6px;
- text-decoration: none;
- font-weight: bold;
- transition: background 0.2s ease;
- }
- .mobilize-button:hover {
- background: #003f86;
- }
- </style>
JavaScript (Fetch and display events)
Wrap this in <script> tags. Replace the placeholders with your actual values:
- <script>
- const ORG_ID = your_org_id_here; // Replace with your own Mobilize org ID
- const API_URL = 'your_api_url_here'; // Replace with your own API URL
- async function fetchEvents() {
- try {
- const response = await fetch(API_URL);
- const data = await response.json();
- renderEvents(data.data);
- } catch (error) {
- document.getElementById("mobilize-events").innerHTML =
- "<p>Unable to load events right now.</p>";
- }
- }
- function formatDate(dateStr) {
- const date = new Date(dateStr * 1000);
- return date.toLocaleString("en-US", {
- weekday: "short",
- month: "short",
- day: "numeric",
- hour: "numeric",
- minute: "2-digit"
- });
- }
- function renderEvents(events) {
- const container = document.getElementById("mobilize-events");
- container.innerHTML = "";
- events.forEach(event => {
- const title = event.title;
- const location = event.location?.venue || "Online Event";
- const timeslot = event.timeslots?.[0];
- const start = timeslot ? formatDate(timeslot.start_date) : "TBA";
- const url = event.browser_url;
- const card = `
- <div class="mobilize-card">
- <div>
- <div class="mobilize-title">${title}</div>
- <div class="mobilize-date">${start}</div>
- <div class="mobilize-location">${location}</div>
- </div>
- <a class="mobilize-button" href="${url}" target="_blank">
- Sign Up
- </a>
- </div>
- `;
- container.innerHTML += card;
- });
- }
- fetchEvents();
- </script>
HTML (Where the events will show up)
Paste this inside the same widget:
<div id="mobilize-events"></div>
Step 3: Publish Your Page
Save the widget.
Publish your page.
Your Mobilize events will now:
Auto‑update with new events
Display in a responsive grid
Require no extra maintenance
Reminder: This is sample code. Replace your_org_id_here and your_api_url_here with your own details.
Thank you.
Visit our Online Community
Distinct is launching a vibrant online community that is totally free! Talk with others in your industry, download free graphic packs, take advantage of exclusive workshops, and more!
Click here to sign up for our community.
Related Articles
How to Duplicate the Page in Duda
To duplicate an existing page on your website, follow the steps below: In the editor sidebar, locate Pages, found below the plus (+) icon. Click Pages to view the list of site pages. Scroll through the list and find the page you want to duplicate. ...
How to Add/Update the Form Recipient on DUDA Form
Click on the form. Click Manage Form. In the pop-up window, select Submissions. Click New Submission Notification. Update, add, or edit the email recipient and subject as needed. Close the pop-up once finished. Changes are saved automatically. Click ...
Leave Website And Design Feedback Using Markup Tools
Leave Website And Design Feedback Using Markup Tools This tutorial guides you through the process of leaving website and design feedback using markup tools. You will learn how to provide clear, actionable comments to improve your project effectively. ...
Viewing Event Attendee List In Eventbrite
Eventbrite - Discover Great Events or Create Your Own & Sell Tickets Made by Vincent Aguirre with Scribe 1. Navigate to https://www.eventbrite.com/ 2. Click "Sign In" 3. Click "Log in" 4. Click "Manage my events" 5. Click here. 6. Click "2000 S ...