top of page
This website was created by Rob's Website Emporium

My Project

Introducing our latest project on My Site 9, featuring a vibrant collection of '80s art curated to bring a nostalgic touch to your space. Dive into a world of bold colors and unique designs that celebrate the creativity of this iconic era. Explore our My Project service and discover how you can incorporate these retro-inspired pieces into your home or office. Welcome to a journey of artistic expression and vintage charm with my 80s art.

import wixData from 'wix-data';

import wixLocation from 'wix-location';

 

$w.onReady(function () {

  // Get the current URL

  const url = wixLocation.url;

 

  // Extract the ID from the URL

  const id = url.split('/').pop();

 

  // Query the "Portfolio/Projects" collection for a specific item

  wixData.query("Portfolio/Projects")

    .eq('_id', id)

    .find()

    .then((results) => {

      if (results.items.length > 0) {

        // Get the item from the results

        const item = results.items[0];

        

        // Extract the image URL from the coverImage object

        const imageUrl = item.coverImage.imageInfo;

 

        // Extract the image name from the Wix URL

        const imageName = imageUrl.split('/').pop().split('#')[0];

 

        // Construct the new URL

        const newImageUrl = `https://static.wixstatic.com/media/${imageName}`;

 

        // Set the image source to the new URL

        $w("#myImage").src = newImageUrl;

        console.log(newImageUrl);

      }

    })

    .catch((err) => {

      console.error("Error fetching data: ", err);

    });

});

bottom of page