こんにちは。
データベースコンテンツを表示させるためにリピーターを使用するかと思いますが、データセットと連携したリピーター内に設置したテキストにデータセット内のURLを紐付ける機能は今の所用意されていません。
このような、HTMLで言えばaタグを使用した使い方は一般的になっているにもかかわらず、Wixではデータセットと紐付けてこれをGUI上で設定できないのは勿体無いなと実装のたびに思っていました。
最近はVeloを使って、リピーターに置いたテキストがクリックされたときにデータベース(コレクション)の同じ行に保存しているURLへ飛ぶというのをよく使うようになったので共有します。
import wixLocation from 'wix-location';
$w.onReady(function () {
//リピーターに設置したテキストがクリックされたとき、
$w('#textTitle').onClick( (event) => {
//リピーター内の要素にアクセス
let $item = $w.at(event.context);
//データセットのURLを取得
let url = $item('#dataset1').getCurrentItem().url
//URLへ移動
wixLocation.to(url);
});
*3/28コードの一部に誤りが有りましたので修正しました。
🙅♂️ $w('#dataset1').getCurrentItem().url → 🙆♂️ $item('#dataset1').getCurrentItem().url
上記の方法では、リピーター内のクリックしたら実行したいテキストのIDを "textTitle"、データセットのIDを "dataset1" 、データベース(コレクション)内に保存しているURLのフィールドキーは " url "としています。
この実行文一通りを何回も使う場合、フロントエンドにjsファイルを作って関数として定義して使用しています。
これを動的ページのアイテムページに飛ばすことによく使っていますが、動的ページ側でも設定が必要でちょっと長くなってしまうので、需要があればまた書きたいなと思います!🍵
Thanks again and keep up the great work! 🌟 If you're as intrigued as I am about solutions blog, I highly recommend checking out my latest blog post. If you're facing technical glitches with your Roku device—whether you’re frantically Googling the Roku support phone number, wondering why your Roku is not connecting to the internet, or puzzled about why does Roku keep restarting—you're not alone, and there’s no need to panic. Roku, while an incredibly reliable streaming solution, can sometimes throw unexpected curveballs at users, especially after system updates, Wi-Fi changes, or long usage sessions. The most common issue—connectivity—often stems from unstable network signals, incorrect DNS settings, or interference from other smart home devices. If your Roku refuses to connect to Wi-Fi despite multiple attempts, the first step is ensuring your router is functioning properly and placed close enough to the Roku. Check if other devices are having the same problem. If it's just the Roku, try a manual network setup or a system restart from the settings menu. But when restarting doesn't resolve it, and your device continues to cycle through reboots or gets stuck at the logo screen, it's time to consider deeper diagnostics. Often, Roku devices restart due to corrupted software, overheating, or power supply inconsistencies. In fact, I remember helping a neighbor—an avid binge-watcher of detective dramas—who nearly gave up on his Roku Ultra because it kept restarting every ten minutes. We traced the problem to a faulty HDMI cable that was causing short surges. Swapping it with a high-quality certified cable fixed it instantly. These real-life fixes underscore that not all Roku issues require technical wizardry; sometimes, it’s just about knowing what to look for. However, if you’ve tried every trick in the book—from resetting your router to factory resetting your Roku—and you’re still stuck, contacting Roku support directly becomes not just helpful, but necessary. That’s where the Roku support phone number can save the day, connecting you with trained professionals who can guide you step-by-step based on your specific model and issue history. Keep your serial number handy when you call, as it speeds up the troubleshooting process. Also, when facing internet connectivity issues, try switching from a 2.4GHz to a 5GHz band if your router supports dual-band—this alone has resolved connectivity for thousands of users who didn’t even realize the frequency mismatch. Another useful tip is checking for software updates manually. Roku devices are supposed to update automatically, but they can miss updates due to network lags. Head to Settings > System > System Update and do a manual check. This can sometimes resolve quirky bugs including looping restarts and failed app launches. Let’s not forget the importance of proper ventilation; Roku devices, particularly older models, can overheat if left in enclosed spaces behind TVs. I once advised a client who placed their Roku Streaming Stick inside a wooden cabinet—once they moved it out into open air, the random rebooting issue vanished. And while you're doing all this, keep an eye on your remote’s batteries; low power can sometimes cause miscommunication signals that mimic software glitches. Still, no matter how tech-savvy you are, there are moments when nothing seems to work, and that’s when professional help bridges the gap between frustration and resolution. Bookmarking trusted sources like the official support site or directly calling the Roku support phone number means you're always a step ahead. Whether you're investigating why your Roku is not connecting to the internet or scratching your head over why does Roku keep restarting, it helps to remember that these are common issues with actionable fixes. The key is to stay patient, follow a logical troubleshooting path, and know when to escalate. And while there are plenty of forums, Reddit threads, and YouTube tutorials offering DIY solutions, not all advice applies to your specific Roku model, which is why referencing a reputable help center matters. Think of it like calling a mechanic—sure, you could try to tinker with the engine yourself, but sometimes you need someone who knows the vehicle inside out. That’s the level of care and clarity that a good support call can offer. In today’s connected world, our streaming devices are more than entertainment; they’re how we unwind, connect with global content, and even access family photos or music playlists. So when Roku hiccups interrupt that flow, quick and reliable fixes become not just a convenience but a necessity. Bookmark those links, save that support number, and stay informed—because streaming should always be smooth, simple, and stress-free.