How to Conecting Hastag in Dyanamic Page ?

I have dynamic pages for content on my web and when I want to connect item tags, tags cannot be connected, how do I get the tags to connect ?

1 Like

Same question here!

You cant try this code for show only

export function repeater3_itemReady($item, itemData, index) {
let tags = itemData.tags;
let tagsHtml = tags.map(tag =>
<span style="background: #f3f3f3; margin-right: 3px; margin-left: 1px; padding-top: 8px; padding-right: 12px; padding-left: 12px; padding-bottom: 10px; border-radius: 3px; top: 5px; position: relative; color: #7c7c7c; font-size: 12px">${tag}</span>)
.join(’ ‘);
$item(’#tags’).html = tagsHtml;
}

Note : Actualy element $item(‘#tags’).html is Text element

The Tags field in a dataset is not for hashtags, it is for checkbox groups only.

Checkbox Groups can only connect to Tags fields.
https://support.wix.com/en/article/about-user-input-elements

@ohsalmanfarizy
Thanks for posting up code for others.

@givemeawhisky You’re welcome brother

Yes I know that, here I just want to try with a different element, and work, : D
But I have a problem with imput tag value, can you show me how to make it ?

Thaks

I actually have a solution for this I can post soon which uses a single text element and is clickable for each tag. The problem is fonts…as they can have all sorts of different scaling, but I’ve added a scaling factor you can adjust manually for it to work.

You can be my guinea pigs if you want

Oke, Give me the code and let me try :slight_smile:

Here you go:

https://www.wix.com/corvid/forum/community-discussion/calling-all-guinea-pigs-dynamic-hashtags

I gave up :cry: , the result is still the same I tried a few days but it’s still the same.

@ohsalmanfarizy What result?

@ohsalmanfarizy Here’s an example that might be closer to your case:

tagger($w('#text1'), {
  tags: $w('#dynamicDataset').getCurrentItem().hashtags,      
  font_size: 12,      
  ratio: 1.4,      
  delimiter: ', ',
  whitespace: 1,
  formatting: `background: #f3f3f3;
    margin-right: 3px;
    margin-left: 1px;
    padding-top: 8px;
    padding-right: 12px;
    padding-left: 12px;
    padding-bottom: 10px;
    border-radius: 3px;
    top: 5px;
    position: relative;
    color: #7c7c7c;`,
    target: '_blank',
  symbol: false,
  href: $w('#dynamicDataset').getCurrentItem().taglinks,
}, (tag) => console.log(tag));

However, don’t put this in a repeater. It’s not intended for that, as this is much better for compatibility and accessibility. Your tags need to be in a single collection field in an array, and your hrefs (if you choose to use them) should also be an array.

Theoretically, all you should need to change here would be the ratio to test it first, and then when you’ve found the right setting for that, you can change the callback to wixLocation.to() or something.

@ohsalmanfarizy v0.2 is much better for your styling.