top of page

How to Create a Floor Plans Page and Database in Wix, using Velo


Who is our customer and what problem did they want to solve?


The content for The Standard was a great use case for Wix's Dynamic Pages feature. The client provided a spreadsheet of different Residences along with the data that would need to be displayed on each of Residence's pages.


What solution did we provide?


To implement this, we made a Content Manager database called "Residences" with data such as the price of the residence, the square footage, the number of bedrooms & bathrooms, as well as the unit number, building number, floor number, an image of their floor plan and a downloadable PDF of the floor plan.


We also created another Content Manager database called "ResidenceFeatures" which would contain features that the residences shared that the "Residences" database would reference. Each residence feature had a title such as "11 ft. ceilings" or "8 ft solid core doors" and had multiple residences that referenced it.



How did we implement the solution?


With these databases in place, the next step was to create dynamic pages for the Residences collection.


When you do this, Wix creates a page in the editor to list all items from that collection as well as a page for each specific item of the collection.


For the "All" items dynamic page, the customer provided drawn images of the property with each residence shown and numbered. Since the residences are divided by floor, we used a Wix Multistate box to show the image for each floor's residences and buttons to change the state of the Multistate box to match the floor selected.


Next, we placed buttons with transparent background and transparent text over each drawn image (residences). From there, you are able to navigate to the individual residence's page.


For each individual residence's page, we used the Wix Data module to query the "ResidenceFeatures" collection referenced above, retrieve the features for each residence, then show them in a repeater.


We used the Multistate box again in order to display an image of the Residence's floor plan without furniture and a thumbnail of the floor plan with furniture that when clicked changes the state of the Multistate Box to a state with a large picture of the residence floor plan with furniture and a thumbnail that changes the Multistate box back to the original state.



Check out the code we used below:


import wixData from "wix-data";
import wixWindow from "wix-window";

$w.onReady(function () {
  const formFactor = wixWindow.formFactor;
  const data = $w("#dynamicDataset").getCurrentItem();
  if (typeof data.floorplan === "undefined") {
    $w("#beforeAfterStateBox").hide();
  }
  const repeater = $w("#repeater1");
  repeater.onItemReady(($item, itemData, index) => {
    $item("#featureText").text = itemData.title;
    if (index === repeater.data.length - 1) {
      repeater.show("fade");
    }
  });

  wixData
    .queryReferenced("Residences", data._id, "ResidenceFeatures")
    .then((result) => {
      repeater.data = result.items;
    });

  if (formFactor === "Desktop") {
    $w("#seeWithFurnitureImage").onClick(() => {
      $w("#beforeAfterStateBox").changeState("withFurniture");
    });

    $w("#seeWithFurnitureText").onClick(() => {
      $w("#beforeAfterStateBox").changeState("withFurniture");
    });

    $w("#seeWithoutFurnitureText").onClick(() => {
      $w("#beforeAfterStateBox").changeState("withoutFurniture");
    });

    $w("#seeWithoutFurnitureImage").onClick(() => {
      $w("#beforeAfterStateBox").changeState("withoutFurniture");
    });
  }
});



Have questions about this? Contact us at 225-250-1888 or email robert@roberthebertmedia.com.



About our company


RHM specializes in helping businesses of all sizes and across all industries achieve their digital and web marketing needs. Whether it's designing a new website, building an app, performing custom development, or running Google Ads, our goal is to showcase how you are the best at what you do and help people connect with you. Contact us at 225-250-1888 to get started!





 
 
 

29 Comments


charlesperez09039
16 hours ago

Hôm trước mình đang xem một số nội dung liên quan đến cách đánh giá độ mạnh của website thì tình cờ thấy nhắc đến Tra cứu điểm. Trước giờ mình chủ yếu quan tâm đến nội dung và lượng truy cập nên ít để ý đến những yếu tố khác ảnh hưởng đến mức độ nhận diện của một trang. Đọc thêm một lúc mới thấy mỗi website có cách xây dựng thông tin và phát triển khác nhau, không thể chỉ nhìn một chỉ số rồi kết luận ngay. Có những trang nội dung khá đơn giản nhưng lại xuất hiện ổn định trong tìm kiếm, trong khi một số trang đầu tư nhiều hơn chưa chắc đã…

Like

Cách thiết lập sơ đồ mặt bằng bằng Velo trên Wix thật sự mở ra nhiều tiềm năng cho các dự án kiến trúc hiện đại. Mình từng thấy cấu trúc cơ sở dữ liệu của một số nền tảng giải trí như SHBET được nhắc tới trong các diễn đàn lập trình, dù không rõ chi tiết nhưng cách họ tối ưu hóa truy vấn vẫn là điều đáng học hỏi. Việc vận dụng công cụ này để tạo ra trải nghiệm người dùng chuyên nghiệp là hướng đi rất hay cho những ai đang làm nghề thiết kế web, giúp tiết kiệm thời gian và tăng tính tương tác.

Like

Việc sử dụng Velo để tạo cơ sở dữ liệu và trang sơ đồ mặt bằng trong Wix thực sự đã mở ra nhiều khả năng mới. Khi mày mò với code, tôi lại liên tưởng đến cách các nền tảng giải trí như SHBET quản lý hàng nghìn dữ liệu người dùng cùng lúc. Dù tôi không sử dụng các dịch vụ đó, nhưng cấu trúc dữ liệu luôn là phần hấp dẫn nhất trong lập trình. Cảm ơn bạn đã chia sẻ những kiến thức kỹ thuật rất giá trị này, tôi sẽ cố gắng áp dụng vào dự án hiện tại của mình.

Like

Bài viết này hướng dẫn rất chi tiết về cách xây dựng database cho trang mặt bằng trên Wix bằng Velo. Việc quản lý dữ liệu phức tạp như thế này làm mình nhớ đến cấu trúc hệ thống của các cổng game online như SHBET mà một người bạn từng nhắc tới, dù mình chưa bao giờ thực sự dùng qua. Nhìn chung, kiến thức về database trong bài áp dụng được cho nhiều mô hình web khác nhau. Đây quả thực là một tài liệu hữu ích cho những ai đang muốn tối ưu hóa trải nghiệm người dùng trên nền tảng Wix.

Like

markmiller29927
2 days ago

Việc xây dựng cơ sở dữ liệu trên Wix thông qua Velo là một bước tiến mới cho những ai không chuyên về code. Tôi từng thấy một vài giao diện cổng game tương tự SHBET có những tính năng lọc thông tin khá thông minh, không rõ họ có áp dụng phương pháp quản lý dữ liệu nào tương tự như hướng dẫn này không. Cách vận hành hệ thống trơn tru luôn là yếu tố quan trọng nhất. Bài viết này giúp tôi hình dung rõ hơn về cấu trúc của các trang web hiện đại hiện nay.

Like
bottom of page