How can I programatically determine plugin's position on page? Assuming that I have two instances of the same plugin on a page, I need to determine their position to display slightly different layout. Is it feasible?
Thanks!
Use section frames:
In the frontend you will realize that the modified plugin container now has an additional css class that can be used for different layout:
<div class="csc-frame csc-frame-frame1" id="c123">
Read more about it here: Custom Frames for Content Elements in Typo3
Let your extension store a counter variable in $TSFE.
Such variables will survive from plugin instance to plugin instance and can be used to count the instances that live in the same page.
Depending on that counter you can change your extension's output.
Example
In your function main do something like this: