F
F
frondEnd2020-04-27 17:32:40
JavaScript
frondEnd, 2020-04-27 17:32:40

How to replace words in a sentence with links using JS?

I have a field with genres in which the names of genres are displayed separated by commas. like this:
genre: action, western, thriller, etc., genres are always written in the same way, that is, with a small letter and do not decline, how to make the script find a certain word in the line and wrap this word in a link to a category, replace it with links need all the words in a line, each has its own link.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Tutubalin, 2020-04-27
@Kennius

Cross-reference module /admin.php?mod=links if it doesn't work System settings-> Optimization ->Enable support for 'Cross-references' module

F
frondEnd, 2020-04-27
@frondEnd

That's why I'm looking for another solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question