You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to be able to add the plugin only on certain pages, but there were a lot of them, as it was a list of events, and there are a lot of pages that would be excluded as well, and both lists would grow over time.
As such, I figured out I could restrict the Plugin basedon the Templates used (the one for the events and the one I used to "switch" to). I added the below code to the top of the plugin, and it worked (ModX 3.10), but I though it might be better if this was built into the CMP options, and then it wouldn't get overwritten on future updates. Also I don't know if it is the fastest way of doing it as well. Also, I often use multi-context setups, and it would be good to have a "Context" filter if need be, so that I don't use it on all contexts. Again, I could do that in the Plugin, but would have to re-add it every time I update this plugin.
I needed to be able to add the plugin only on certain pages, but there were a lot of them, as it was a list of events, and there are a lot of pages that would be excluded as well, and both lists would grow over time.
As such, I figured out I could restrict the Plugin basedon the Templates used (the one for the events and the one I used to "switch" to). I added the below code to the top of the plugin, and it worked (ModX 3.10), but I though it might be better if this was built into the CMP options, and then it wouldn't get overwritten on future updates. Also I don't know if it is the fastest way of doing it as well. Also, I often use multi-context setups, and it would be good to have a "Context" filter if need be, so that I don't use it on all contexts. Again, I could do that in the Plugin, but would have to re-add it every time I update this plugin.
Added code:
The text was updated successfully, but these errors were encountered: