Rotation Logic
-
Hi,
I would like to do the following algorithm on the block.
1. The code_main is always inserted first.
2. Then a rotation is done: either code_1 or code_2.However, judging by the logic of Ad Inserter, it is impossible to do this.
Because the [ADINSERTER ROTATE] shortcode separates the codes, not precedes them.Thus, the following algorithm does not work:
code_main [ADINSERTER ROTATE name="code_1"] code_1 [ADINSERTER ROTATE name="code_2"] code_2
And I have to do this code:
[ADINSERTER ROTATE name="code_1"] code_main code_1 [ADINSERTER ROTATE name="code_2"] code_main code_2
And if you imagine that code_main is very big and with additional checks via other shortcodes, you get a very cumbersome code.
In other words, it would make more sense if [ADINSERTER ROTATE] acted solely as a selector for subsequent code rather than a code separator for rotation.
It seems illogical to me when the following code is about rotating three rather than two codes:code_1 [ADINSERTER ROTATE] code_2 [ADINSERTER ROTATE] code_3
The following seems reasonable:
[ADINSERTER ROTATE] code_1 [ADINSERTER ROTATE] code_2 [ADINSERTER ROTATE] code_3
Of course, it’s possible that I don’t understand something, that’s why I’m asking for your help.
In general, the question still stands: How to make the above described block algorithm with obligatory output of code_main and subsequent rotation between code_1 and code_2?
- The topic ‘Rotation Logic’ is closed to new replies.