Want to alter register page but can't find it ...
My question actually consists of various aspects ... will do my best to keep things as clear as possible.
Goal:
I want to add a Google Analytics onClick event to the signup button on the register page.
Problem:
I can't find the register page
I do find various register*.php variations in applications/dashboard/views/entry but none of them seems to be the actual one. Meaning: I've added a little extra 'test' text to the code, cleared the cache, but the word 'test' doesn't show up in my front end.
Ofcourse I'm not going to make changes in the core files itself - just now for testing - but I'll put the modified files in my theme.
Is there something I'm overlooking here?
PS: Am fairly new to Vanilla, but am pretty well experienced with MVC architectures and also with themes & childthemes in Wordpress. Looking at the code & structure of Vanilla, it seems to me that these other experiences should be of help with understanding, but no luck so far in this issue ...
Best Answer
-
R_J Admin
MVC experience is great. User functions are part of
/applications/dashboard
and you find the views in/applications/dashboard/views/
. Register views are in the subfolderentry
, so you have searched at the right place...But don't change core files!
Instead create a plugin. Look at other plugins that also change that view: http://vanillaforums.org/discussion/comment/219424/#Comment_219424
But if you like to add an onClick event, you might better be using an extra JS snippet for that and don't change the view at all.
You would need a (very simple) plugin that adds your js when the entry controller is called:
public function EntryController_Render_Before ($Sender) { $Sender->AddJsFile('yourfile.js', 'plugins/YourPlugin'); }
Your js file should be located at
/plugins/YourPlugin/js/yourfile.js
in this case.6
Answers
MVC experience is great. User functions are part of
/applications/dashboard
and you find the views in/applications/dashboard/views/
. Register views are in the subfolderentry
, so you have searched at the right place...But don't change core files!
Instead create a plugin. Look at other plugins that also change that view: http://vanillaforums.org/discussion/comment/219424/#Comment_219424
But if you like to add an onClick event, you might better be using an extra JS snippet for that and don't change the view at all.
You would need a (very simple) plugin that adds your js when the entry controller is called:
Your js file should be located at
/plugins/YourPlugin/js/yourfile.js
in this case.Thanks for your suggestions @R_J will take some more time to digg into this!