# How to inherite / override index controller?

**URL:** <https://forum.shopware.com/t/how-to-inherite-override-index-controller/54007>\
**Category:** Shopware 5\
**Created:** [11. Juli 2018 um 05:32 UTC](https://forum.shopware.com/t/how-to-inherite-override-index-controller/54007 "2018-07-11T05:32:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![testseeders](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@testseeders](https://forum.shopware.com/u/testseeders)\
**Post date:** [11. Juli 2018 um 05:32 UTC](https://forum.shopware.com/t/how-to-inherite-override-index-controller/54007/1 "2018-07-11T05:32:39Z")

</div>

Hello, how can overriding controller?&nbsp;If I want to change in Index Controller How is it possible?

It means how to inherit an index controller to my custom index controller.

If you know, please provide a file structure

---

<div class="post-metadata">

**Author:** ![simkli](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/simkli/32/13124_2.png) [@simkli](https://forum.shopware.com/u/simkli)\
**Post date:** [11. Juli 2018 um 06:20 UTC](https://forum.shopware.com/t/how-to-inherite-override-index-controller/54007/2 "2018-07-11T06:20:01Z")

</div>

Hi testseeders,

you misunderstood a key-concept here. You shouldn’t change the controller itself. You need to rely on a distpach-event.  
Here’s a short overview: [Shopware controller](https://developers.shopware.com/developers-guide/controller/#extending-shopware's-default-controllers)

But actually you should start here: [Plugin quick Startup Guide](https://developers.shopware.com/developers-guide/plugin-quick-start/)

If you read it until the end and understand it, you should be able to solve the problem.

Best regards
