こんにちは。
データベースコンテンツを表示させるためにリピーターを使用するかと思いますが、データセットと連携したリピーター内に設置したテキストにデータセット内の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ファイルを作って関数として定義して使用しています。
これを動的ページのアイテムページに飛ばすことによく使っていますが、動的ページ側でも設定が必要でちょっと長くなってしまうので、需要があればまた書きたいなと思います!🍵
Upon the Draft Board: Maason Smith would be a large-upside pick out afterwards within just the draft
The Kansas Town Chiefs delivered defensive line practice Joe Cullen in the direction of fulfill and hard work with a few of defensive take care of potential clients at the LSU qualified working day Mekhi Wingo and Maason Smith. Smith designed an prompt have an impact on, manufacturing the All SEC freshman workers. He performed 354 snaps as a genuine freshman, post 4 sacks and 16 pressures, which are great figures for a accurate freshman. Regretably, that momentum didnt convey into his instant 12 months. Inside of the 2022 time opener vs. Florida Country, Smith received harm celebrating a engage in, which expected knee surgical treatment and finished his comprehensive sophomore rebounded this very last year https://www.chiefssportsstore.com/collections/hal-presley-jersey, participating in 12 of 14 game titles. Regrettably, his studies have been underwhelming. Inside of 584 snaps, he just recorded 23 pressures, a few sacks and 2 quarterback hits. Smith did incorporate an ankle damage at the starting off of the yr and was suspended for a sport for NIL violations just before the contemporary legislation ended up enacted. Smith did just about every drill unless of course the large leap and bench thrust at the NFL Scouting Mix. He calculated within just at 6? he was an Extremely rigid mover. He doesnt include a ton of bend or overall flexibility inside his match, hence remaining equipped towards get with tempo upon possibly shoulder is not likely. Sadly, where by Smith does get as a move rusher is with his energy. Even if he doesnt acquire a very good initially stage https://www.chiefssportsstore.com/collections/janarius-robinson-jersey, his period and vitality make it possible for him in direction of earn late into associates. At just one issue, Smith was regarded a male who may perhaps be a initially spherical choose, probably even in just the ultimate 15. He experienced demanding situations within just his university job, however I dont look at that ability upon motion picture. His stiffness and absence of electrical power in direction of gain with rate are more than enough for me not toward look at him that point of getting stated, there is a lot of skill within just his video game. Even with those people problems, your self not often view gamers with his issue of period, energy, and human body construction. There is a rationale he was a prestigious recruit. Even When his 2023 tape was predominantly not Wonderful Steven Nelson Jersey, there are continue to a lot of flashes that present why scouts and analysts take enthusiastic relating to s crank out just one issue distinct this would be an upside opt for. If he goes above the late 3rd spherical or early Working day 3, oneself dont perspective quite a few prospective buyers within just this amount with that variety of ability. If the Chiefs draft him, itll be due to the fact Cullen bought towards notice Smith perfectly more than enough that hes certain he can receive the greatest out of him.
https://www.chiefssportsstore.com