Archive for September 1st, 2009:
IE6 Venn Diagram
September 1st, 2009 / 1 Comment » / by Faizan

Hiding the Administrator or Front end layout template in Joomla!
September 1st, 2009 / No Comments » / by Faizan
It’s taken a good part of an hour trying to find how to disable the administrator or front end template for Joomla.
So I thought I’d just make a post in an effort to turn this frustrated energy into something positive.
To display only the contents of the view on the page without being framed by a template, the tmpl variable needs to be set to “component”.
Something along the lines of having the following snippet in the controller method:
JRequest::setVar(’tmpl’, ‘component’);
Either that, or adding “&tmpl=component” to the URL.
I remember doing it before, however it’s been a while.
All attempts at searching on how to do the above proved frustratingly impossible as the organic search results for google are filled with people asking how to “disable legacy” modes, “templates”, “modules”, “plugins”, how to make your joomla admin panel rock(!!!!) – not what I was looking for!
Hope this helps other Joomla! component developers
Symfony Admin Generator Calling Actions with Custom Parameters
September 1st, 2009 / 8 Comments » / by Faizan
The administration module actions can receive custom parameters using the query_string argument in a link_to() helper. For example, to extend the previous _edit_header partial with a link to the comments for the article, write this:
It filters the comments to display only the ones related to $article. Using the query_string argument, you can specify a sorting order and/or a filter to display a custom list view. This can also be useful for custom interactions.
Override index function
public function executeIndex(sfWebRequest $request)
{
// For filter.. This code was missing in symfony documentation.
if ($request->getParameter('filter'))
{
$this->setFilters($request->getParameter('project_filters'));
}
//-----------------
// sorting
if ($request->getParameter('sort'))
{
$this->setSort(array($request->getParameter('sort'), $request->getParameter('sort_type')));
}
// pager
if ($request->getParameter('page'))
{
$this->setPage($request->getParameter('page'));
}
$this->pager = $this->getPager();
$this->sort = $this->getSort();
}
Recent Comments