We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum
Outputting HTML in App is causing "Cannot modify header information" errors
I've built a small Perch app to skin the admin, which outputs CSS and some other things in the head using the Perch app API.
It works great but I have a problem when trying to echo out admin favicon, getting a "Cannot modify header information"… error. I know this error is usually caused by things outputting in the wrong place. I assume it's because I'm just echo'ing it out rather than using an official API method.
$Perch = Perch::fetch(); $Perch->add_css($API->app_path() . '/standard-admin.css'); echo '<link rel="shortcut icon" href="/perch/addons/plugins/ui/favicon.ico">'; <-- This causes an error
How would I echo this out correctly?
I did try looking through the API documentation but couldn't piece anything together—either that or I'm not looking correctly.
Incidentally, although I was told about
$Perch->add_css through the forum, I could not find this documented and I'm curious where I would find this info. I'd like to be able to troubleshoot this on my own but either it's not documented or I can't find it.
Want to reply to this thread?Login with Perch