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!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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: