Hot answers tagged

8 votes
Accepted

Search tools is not open by default

I managed to add options as below JLayoutHelper::render( 'joomla.searchtools.default', array('view' => $this, 'options' => array('filtersHidden' =>$hidden))); If $hidden is set as ...
user avatar
  • 2,651
7 votes
Accepted

What is the recommended way to structure a Joomla 3 custom component view using angularJS?

According to my experience: JSON views: I have created components based FoF automatic JSON rendering https://github.com/akeeba/fof In this way, it is straightforward to load /get queries. In spite of ...
user avatar
  • 7,415
6 votes

How can include the component view in plugins

From joomla 3.0 onwards a layout sharing feature is introduced, using it you can call a layout across views or extensions. It requires creating a layout object and then render the view using that ...
user avatar
  • 358
6 votes
Accepted

How to add image/icon to the header of the administration pages of a component?

You can define a class for the Header Title of your view, while creating the toolbar for your view within the view.html.php. Within your "addToolbar()" function, you can call the JToolbarHelper::...
user avatar
  • 19.5k
5 votes
Accepted

Custom Component - Linking File Upload From Controller to View

To start, it would probably be best to go through all of this: http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Developing_a_Basic_Component. It's a lot of information, but it will definitely ...
user avatar
5 votes
Accepted

Show image using file_get_contents in a popup window

I agree with Jeremy, you could simply use an <img> tag and insert the filename using PHP. However, if for some reason you want to read the file using PHP, try using readfile(). In addition, you ...
user avatar
  • 13.3k
5 votes

What is the correct method of developing a front-end list and edit view

It is the right way :-) Build your links with JRoute, for example: JRoute::_('index.php?option=com_productman&view=product&product_id=x'); It will automatically append the menu item ID of ...
user avatar
  • 3,693
4 votes

Show image using file_get_contents in a popup window

Setting the header and trying to process the image directly is really unnecessary. This will produce the result you're looking for: Your second code block should be as follows $input = JFactory::...
user avatar
4 votes
Accepted

Only show articles by current user in category view using plugin

You do not need a plugin for that. Just override a category view and put your check there. For example for the Blog view override blog.php and around line 60 make your check: if ($item->...
user avatar
  • 4,055
4 votes
Accepted

Joomla singular and plural view names

Yes, there is. Take a look at this if statement in JControllerForm class. So to redirect to deliverys, you have to add property protected $view_list = 'deliverys'; in your controller. If this dosen't ...
user avatar
  • 3,208
4 votes
Accepted

How to render a component view in a module?

This is code I write time ago for Joomla 1.5, you will need adapt it for jooma 3.x (JRequest -> JInput, ...), and surely there is more elegant way to do this. This is the basic part of module.php My ...
user avatar
4 votes
Accepted

SQL syntax error when attempting to filter list view - how to build WHERE clause?

Try changing your query to the following: $query->select('#__users_2679886', 'name') ->from($db->qN('#__users', '#__users_2679886')) ->where($db->qN('id') . ' = ' . $db->...
user avatar
  • 26.5k
3 votes

Search tools is not open by default

The filter fields will automatically populated if they are listed in your Model's $config['filter_fields'] array in the constructor. For example: public function __construct ($config = array()) { ...
user avatar
  • 2,971
3 votes
Accepted

How to redirect to a "part-view" of a view file?

Probably you just need to add the layout GET parameter to the URL Also you can redirect in the controller using setRedirect() and JRoute. $this->setRedirect(JRoute::_('index.php?option=...
user avatar
  • 347
3 votes

Joomla-Development: Set default view

I think your view files are missing or view class is named incorrectly (correct is [Prefix]View[Viewname]). If I change the name of administrator/components/com_banners/views/ to /viewx/ I get the ...
user avatar
  • 505
3 votes
Accepted

Joomla 3 frontend view xml: How do I add a custom field to the menu item's paramaters?

Try removing the blank spaces in fields name and fieldset name attributes <fields name="RouteSettings"> <fieldset name="RouteSettings"> <field name="route_id" type="sql" ...
user avatar
  • 967
3 votes
Accepted

Component view problem. Model method not called

It sounds like you only have one model, rather than the expected one-model-per-view. As such, it is looking for the function in a model related to your singles view, which does not exist. Try ...
user avatar
  • 3,072
3 votes
Accepted

How can I have a dynamic $default_view?

You can't set a class property to a dynamic value, such as a method call, during declaration like you're attempting. See http://php.net/manual/en/language.oop5.properties.php You would need to set it ...
user avatar
  • 890
3 votes
Accepted

Is it possible to insert a category list view inside an article?

One option would be to use the Articles - Category module that's shipped with Joomla. Create module Set all the options you require Assign it to a custom position, e.g category-test In your article, ...
user avatar
  • 26.5k
2 votes

Joomla Tag Result Page Accordion

Not quite the full answer, BUT someone has already started working on this, though not really a rendering of the search page, more of a menu module, but certainly a very nice start http://www.demo-...
user avatar
2 votes
Accepted

Component name different to the default view name, how to display default view?

Answered my own question upon reviewing the API documentation and playing around with the code. I was able to display a different view by specifying the view type and view class prefixes: class ...
user avatar
2 votes

Text with space entered via tinymce editor showing unexpected behaviour at front end

Have you tried jce editor? I always replace the default with this one and work s fine for me. https://www.joomlacontenteditor.net/
user avatar
2 votes
Accepted

Featured view Title position?

Use Joomla's template override, by using this method you can override all Joomla core template styles. For com_content PATH_TO_JOOMLA/components/com_content/views/article/tmpl/default.php to ...
user avatar
  • 1,507
2 votes

Search engine for a custom component

It's very easy to create your own search plugin as is fully documented at Creating a search plugin.
user avatar
  • 7,685
2 votes
Accepted

Joomla layout difference edit.php and default.php

If you follow the standard conventions, edit.php will be used for the form layout that allows you to edit an item, and default.php will be used for viewing an item as well as viewing a list of items. ...
user avatar
2 votes
Accepted

How do I add print button in Joomla list view.?

I don't know if you talk about the frontend or backend... if you are in the Joomla! backend you can create a custom toolbar button in your view.html.php $bar = & JToolBar::getInstance('toolbar'); ...
user avatar
  • 102
2 votes
Accepted

Component Views don't appear when creating a new menu item

Insure that there is a matching XML file for the view in the \tmpl folder: <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_MYCOMPONENT_VIEW_TITLE" option="View"...
user avatar
  • 7,685
2 votes
Accepted

Access Model State Variable in View

You should use get function of the state object (object of JObject class) $state = $this->get('State'); $requestId = $state->get('request.id', 0); second parameter is default value to return ...
user avatar
  • 2,971
2 votes
Accepted

How to avoid loading a module in a view without creating a menu item for that view

I'm pretty sure you can use Advanced Module Manager for this purpose. There are many different rules you can apply to your modules in order to control when and where your modules should be displayed ...
user avatar
  • 13.3k
2 votes

How to remove component name from URL?

You can use .htaccess In joomla with apache rewrite feature. Rename the file htaccess.txt to .htaccess In root joomla folder; Enable Apache rewrite In global configuration In joomla admin area.
user avatar
  • 991

Only top scored, non community-wiki answers of a minimum length are eligible