Skip to content

Commit

Permalink
Update controller.php
Browse files Browse the repository at this point in the history
specify the type of the view (RAW for dump tree in Frontend, HTML for admin comp) to make the JDump Frontend menu link working mathiasverraes#10
  • Loading branch information
garstud committed Feb 16, 2015
1 parent 1a86be7 commit 6522961
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/administrator/components/com_dump/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,24 @@
class DumpController extends JControllerLegacy{

function display($cachable = false, $urlparams = false) {
$mainframe = JFactory::getApplication(); $option = JRequest::getCmd('option');
$mainframe = JFactory::getApplication();
$option = JRequest::getCmd('option');
$Itemid = JRequest::getInt('Itemid');


// we need to add these paths so the component can work in both site and administrator
$this->addViewPath( JPATH_COMPONENT_ADMINISTRATOR . '/views' );
$this->addModelPath( JPATH_COMPONENT_ADMINISTRATOR . '/models' );

// get some vars
$document = JFactory::getDocument();
$viewType = $document->getType();
// specify the type of the view (raw for dump tree in Frontend, html for admin comp)
if($mainframe->isSite()) {
// specify the RAW format for the JDump Frontend menu link
$viewType = "raw";
} else {
$viewType = $document->getType();
}
// get some vars
$viewName = JRequest::getCmd( 'view', 'about' );
$viewLayout = JRequest::getCmd( 'layout', 'default' );

Expand Down

0 comments on commit 6522961

Please sign in to comment.