I have a menu item for one of my content types that I want to be able to package up some different files, create a .zip file, link to start a download and then display some text which will describe what the user needs to do with the .zip file.
Here is my menu declaration:
'title' => 'Download Icon',
'description' => 'Package up the selected icon as a zip file and download it',
'page callback' => 'download_icon_page_callback',
'page arguments' => array(1),
'access callback' => 'download_icon_access',
'access arguments' => array(1),
'type' => MENU_LOCAL_TASK,
),
And here is my page callback that doesn't work for obvious reason:
function download_icon_page_callback()
{
// some code to compile my .zip file
drupal_goto('path/to/my/file.zip');
return t('Here are some inustrctions!');
}
So this above function can link to the file compiled .zip with a drupal_goto but since this a redirect the return t will not ever go through. Is there anyway I can hit both of these in a single page callback? Also, is there a better way to display formatted text from the menu item instead of just doing a return t() from my page callback?