Plugin extenders - variable which shows that page is called from Dashboard ?
For example page of UserProfile contains '/Dashboard' in the URL but is not called from a Dashboard window.
Pages Role, Settings on the contrary belong to Dashboard but not contain '/Dashboard' in the URL.
public function Base_Render_Before($Sender) {
if ((!(strpos(curPageURL(),"/forum/dashboard/profile/")>0)) and
((strpos(curPageURL(),"/forum/dashboard/")>0) or
(strpos(curPageURL(),"/forum/vanilla/settings")>0) or
(strpos(curPageURL(),"/forum/role")>0) or
(strpos(curPageURL(),"/forum/plugin")>0) ))
Is there some variable which shows that page is called from Dashboard ?
0
Best Answer
-
Todd
Vanilla Staff
We currently use this:
if ($Sender->MasterView == 'admin') { ... }or
if (Gdn::Controller()->MasterView == 'admin') { ... }0

Answers
We currently use this:
if ($Sender->MasterView == 'admin') { ... }or
if (Gdn::Controller()->MasterView == 'admin') { ... }tnx. this saves a lot of bad coding.