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

Administation Panel - Filter Option & Edit Entry

8 jaren 6 maanden geleden #1327 door 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?

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

8 jaren 5 maanden geleden #1343 door Xze Rod
Beantwoord door Xze Rod in topic Administation Panel - Filter Option & Edit Entry
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>

Gelieve Inloggen of een account aanmaken om deel te nemen aan het gesprek.

Tijd voor maken pagina: 0.046 seconden
Gemaakt door Kunena

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.