top of page
Lanre Olayiwola

Lanre Olayiwola

Hide Repeater Items with CMS Database Content

Updated: Dec 29, 2023

In this lesson, you will learn how to use CMS Database content to control what elements show in repeaters.


CMS

$w.onReady(function () {

    $w('#dataset1').onReady(() => {
        $w('#repeater1').onItemReady(($item, itemData) => {
            let sTitle = itemData.specialTitle;
            if (sTitle === "" || sTitle === null || sTitle === undefined) 
                $item("#badge").hide();
            } else {
                $item("#badge").show();
            }
        })
    })
});

For this Velo code to run properly on your website, you either need to name your dataset to "dataset1" or change the code to match the name you provided to it. Same goes for the Repeater, badge, and lastly, make sure you use the correct Field Key from your database.


Have Fun!


Related Posts

3 Comments


SEO JACK AMPLY
SEO JACK AMPLY
5 days ago

tải hitclub để bước vào thế giới giải trí đỉnh cao, nơi bạn có thể chơi game bài hợp pháp, đổi thưởng nhanh chóng và an toàn tuyệt đối. truy cập ngay https://hitclub1.bz/

Like

789WIN là lựa chọn đáng tin cậy cho game thủ, mang đến trò chơi đa dạng và dịch vụ chuyên nghiệp. Khám phá thêm cộng đồng 789winv dev tại social: https://eo-college.org/members/789winvdev/

Like

SV88 Show
SV88 Show
Sep 26

13win không chỉ mang đến trò chơi đa dạng, bảo mật tối ưu mà còn sở hữu hệ thống chăm sóc khách hàng tận tâm với Live Chat 24/7. Mang lại sự an tâm cho cược thủ trong mọi ván cược. Trải nghiệm ngay tại: https://13wincom.io/

Like
bottom of page