Hello,
I’m building a site with MODAL windows for the control panel for administrators to add/edit entries.
Thus far I have: site.com/manager/index.php?S=0&D=cp&C=content_publish&M=entry_form&channel_id=5&cat_id=5
I’ve figured out how to add a channel_id (&channel_id=5) to the url. But I don’t know if there is a way to have a category selected automatically.
Any clue if this is possible?
Thanks in advance!
Moved to Development and Programming by Moderator
Are the links going into the template pages? you would have to build the link string using your channel ee tags.
one idea:
on
index.php?S=0&D=cp&C=content_publish&M=entry_form&channel_id=1i would add my own param like
&my_cat=5
then build a custom extension using the hook: entry_submission_start
a function in your extension would by called using the hook which would look something like this:
function change_cat(){
if ($this->EE->input->get('my_cat')){
$this->EE->load->library('javascript');
$this->EE->javascript->output(array("
//insert javascript code that would access DOM and change category selector based on $this->EE->input->get('my_cat')
"));
$this->EE->javascript->compile();
}
return TRUE;
}Luke, thanks SO SO SO much.
I already have exp with SAEF’s, but I’m trying to build something more flexible that I can use & not worry about. Even now Playa & Matrix aren’t available for SAEF’s. Plus why re-invent the entry page every time, right!?
My next question is still… is there any list of all the “&this=XXX” that are already setup ? I just saw “use_autosave=n” and thought maybe there are all sorts of these out there. Or are they all based on hooks?
Attached is what I have so far. My next hook or something else might be to take out the top CP navigation & footer when openning this way.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.