Modules Anywhere

Presale question

10 months 1 week ago #76100

Silke Menne's Avatar Silke Menne

Hello Peter,

I am a happy customer of Advanced Module Manager since several years :)

I wondered if it is possible to use Modules Anywhere to place a module inside articles, but without editing every single article.

The module should show up on every page that contains content, after a specific number of paragraphs (e.g. after 3 paragraphs).

Is that possible with Modules Anywhere?

Thanks and kind regards

Silke

10 months 1 week ago #76101

Peter van Westen's Avatar Peter van Westen Admin

Not with only Modules Anywhere.

You can use ReReplacer to insert a Modules Anywhere {module} tag after the 3rd paragraph - if found.

10 months 6 days ago #76143

Silke Menne's Avatar Silke Menne

Hi Peter,

thanks for your answer. This would be a great workaround, but I wouldn't be able to set the code to be only shown on mobile or only on desktop.

Thanks anyway for your help and keep up good work :)

Silke

10 months 6 days ago #76145

Peter van Westen's Avatar Peter van Westen Admin

You can with ReReplacer Pro.

10 months 5 days ago #76153

Silke Menne's Avatar Silke Menne

Thats good news!! Thank you :)

I have no doubt that ReReplacer an absolut fantastic and powerful tool, but I am not a programmer or so ;)
I had a look at the list of regular expressions and the testing tool, did some searching on google, but I am having a hard time in creating a regular expression for replacing the 3rd paragraph with a module tag ...

10 months 5 days ago #76155

Peter van Westen's Avatar Peter van Westen Admin

Try this:

(.*?</p>.*?</p>.*?</p>)
Replace with:
\1 {module My Module}
Swith on the Regular Expression option and set the Search Area to 'Articles'.

10 months 5 days ago #76157

Silke Menne's Avatar Silke Menne

It works! So cool.

But the expression replaces every 3rd paragraph (i. e. the 3rd, the 6th, the 9th and so on).
I just wanted to replace only one paragraph (the 3rd) in the whole article. Is that possible, too?

10 months 5 days ago #76158

Peter van Westen's Avatar Peter van Westen Admin

Sorry, search should be:

^(.*?</p>.*?</p>.*?</p>)

10 months 5 days ago #76169

Silke Menne's Avatar Silke Menne

Thank you so much, it works! Just bought the pro version :)

10 months 5 days ago #76170

Peter van Westen's Avatar Peter van Westen Admin

Great to hear :)

With the Pro version of ReReplacer you can also make the replacement only happen on selected devices or any other condition you want. Same set of conditions (assignments) you know from Advanced Module Manager.