开发者

How to display an error page in Joomla! raw component code

开发者 https://www.devze.com 2023-01-01 02:49 出处:网络
I need to display 404 and 403 error pages if some conditions are true in my component code. I\'m using /index.php?option=com_live_editor&format=raw to c开发者_StackOverflow社区all a component. rai

I need to display 404 and 403 error pages if some conditions are true in my component code. I'm using /index.php?option=com_live_editor&format=raw to c开发者_StackOverflow社区all a component. raiseError just shows me an output from component with no messages.


Why are you using format=raw in your query string? Is this an Ajax call?

JError::raiseError(404, "Message");

is the appropriate way to show error pages in Joomla.

0

精彩评论

暂无评论...
验证码 换一张
取 消