× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

Administation Panel - Filter Option & Edit Entry

8 Jahre 6 Monate her #1327 von Xze Rod
Hi everybody,

long time ago, i used this fantastic site to create a component on my own and it works fine.

Now i want to update my component because i got some notice and ideas for better working with. Every change i made works just fine and i use the new component on my homepage but there are two things, i really don't know how i set them on last time.


1. Filter Options in my Administration Panel.
On my old component, i get on the left site some options to filter the datatable with special entries in columns. I don't know, where to set (maybe just one click?) this option because in my actual component, this filteroptions aren't shown.

2. Edit List - Entry by Clicking on the 1. Column Link
In my old Component, my first column (the ID) was linked so when i clicked on it, i got the Update-Screen. Now, i have to check a box, scroll up and click on edit. Same problem here i don't know, what i missed in my settings.

could you please help me?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

8 Jahre 6 Monate her #1343 von Xze Rod
I don't know, which Settings i have to activate in component-creator to get this solutions, but got both problems work for me:


1. Filter Options in Administrator Panel
---components/com_yourcomponent/views/list/view.html.php
		// Set sidebar action - New in 3.0
		JHtmlSidebar::setAction('index.php?option=com_jyourcomponent&view=list');
		$this->filterForm = $this->get('FilterForm');
		$this->activeFilters = $this->get('ActiveFilters');
        
	//Filter for the field 'column2'
		$select_label = JText::sprintf('COM_JOOGAMES_COLUMN2', 'Column2');
		$options = array();
		$options[0] = new stdClass();
		$options[0]->value = "1";
		$options[0]->text = "Case A";
		$options[1] = new stdClass();
		$options[1]->value = "2";
		$options[1]->text = "Case B";
		JHtmlSidebar::addFilter(
			$select_label,
			'filter_column2',
			JHtml::_('select.options', $options , "value", "text", $this->state->get('filter.column2'), true)
		);
		
		$this->extra_sidebar = '';

2. Edit List - ENtry by Clicking on the 1. Column Link

---components/com_yourcomponent/views/list/tmpl
Change the first <td> element:
<td>
	<?php echo $item->id; ?>
</td>
to
<td>
	<a href="<?php echo JRoute::_('index.php?option=com_yourcomponent&task=yourview.edit&id='.(int) $item->id); ?>">
	<?php echo $this->escape($item->id); ?></a>
</td>

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 0.049 Sekunden
Powered by Kunena Forum

Wir verwenden eigene Cookies und Cookies von Drittanbietern, um Ihr Nutzererlebnis zu verbessern und Ihnen einen optimalen Service zu bieten. Wenn Sie die Website weiter nutzen, gehen wir davon aus, dass Sie mit unserer Cookie-Politik einverstanden sind.