- Posts: 21
COMMUNITY FORUM
Cascading Dropdown for k2 categories in Administra
- behzad
- Topic Author
- Offline
- Junior Member
Less
More
10 years 7 months ago #124690
by behzad
Cascading Dropdown for k2 categories in Administra was created by behzad
I want to show k2 category list in back-end and front-end item editting like this:
select main category : category1 - category2 and... and if user select category1 then appear another dropdown that shows subcategories of category1
I found the files :
I believe this is the code that is producing the category drop down: .../components/com_k2/views/item/tmpl/form.php
<tr>
<td align="right" class="key"><?php echo JText::_('Category'); ?></td>
<td><?php echo $this->lists; ?></td>
</tr>
select main category : category1 - category2 and... and if user select category1 then appear another dropdown that shows subcategories of category1
I found the files :
I believe this is the code that is producing the category drop down: .../components/com_k2/views/item/tmpl/form.php
<tr>
<td align="right" class="key"><?php echo JText::_('Category'); ?></td>
<td><?php echo $this->lists; ?></td>
</tr>
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 7 months ago #124691
by Yiota
Replied by Yiota on topic Re: Cascading Dropdown for k2 categories in Administra
For the frontend the file is itemform.php and can be overriden in your template folder.
For the backend is a little more complicated than that. The file is administrator/components/views/item/view.html.php and the code for the category select list is around line 385
Modifying core files is not recommended, however.
For the backend is a little more complicated than that. The file is administrator/components/views/item/view.html.php and the code for the category select list is around line 385
Modifying core files is not recommended, however.
Please Log in or Create an account to join the conversation.
- behzad
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
10 years 7 months ago #124692
by behzad
Replied by behzad on topic Re: Cascading Dropdown for k2 categories in Administra
thanks for your reply , thanks GOD!!!! :)
in itemform.php , I found this :
<?php echo $this->lists; ?>
how can I edit this as I said in last post?
in itemform.php , I found this :
<?php echo $this->lists; ?>
how can I edit this as I said in last post?
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
10 years 7 months ago #124693
by Yiota
Replied by Yiota on topic Re: Cascading Dropdown for k2 categories in Administra
I'm afraid that I don't know the answer to that because I'm not a programmer.
You can however seek other developers in this forum that are willing to help you with this as a custom work.
You can however seek other developers in this forum that are willing to help you with this as a custom work.
Please Log in or Create an account to join the conversation.
- behzad
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
10 years 7 months ago #124694
by behzad
Replied by behzad on topic Re: Cascading Dropdown for k2 categories in Administra
I don't have any problem with custom work! so if anyone can do this , I pay him or her! but there is a small problem that is : I'm living in Iran and how can I pay?!!!
Please Log in or Create an account to join the conversation.
- behzad
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
10 years 7 months ago #124695
by behzad
Replied by behzad on topic Re: Cascading Dropdown for k2 categories in Administra
Hi,
I did this , but my problem now is when I select category always load on of the extrafields group , how can I solve it?
I did this , but my problem now is when I select category always load on of the extrafields group , how can I solve it?
Please Log in or Create an account to join the conversation.