PDA

View Full Version : [CLOSED] Rendering Content to an Ext.Panel



edip
Oct 21, 2013, 8:42 PM
Hello,
How can I render my content (@RenderSection("Content",true) ) inside an Ext.Panel on my Layout page?

Thanks.

Baidaly
Oct 21, 2013, 10:46 PM
Hello!

You can use ItemsFromSection like in this samples:
http://mvc.ext.net/#/Items/Section/
http://mvc.ext.net/#/Items/Section_From_Page/

edip
Oct 22, 2013, 1:21 PM
Hello!

You can use ItemsFromSection like in this samples:
http://mvc.ext.net/#/Items/Section/
http://mvc.ext.net/#/Items/Section_From_Page/

Thanks Baidaly...
Do I need to repeat my common sections on every view page? In this example the "Index.cshtml" has a "section1"...in my case section1 does not change from view to view...so how do I tell it to use a single piece of code everytime?

Thanks again.

Daniil
Oct 22, 2013, 4:56 PM
Hi,

I don't quite understand.

The only thing you should do is:

.ItemsFromSection(this, "section1")

Maybe, a test case could clarify something.

Is that you are looking for?
http://mvc.ext.net/#/Items/Page/

Baidaly
Oct 23, 2013, 12:34 AM
Thanks Baidaly...
Do I need to repeat my common sections on every view page? In this example the "Index.cshtml" has a "section1"...in my case section1 does not change from view to view...so how do I tell it to use a single piece of code everytime?

Thanks again.

If you want to see it on every page then you have to add it. However, you can use BaseLayout with added items from the section to avoid it.

edip
Oct 23, 2013, 11:51 AM
If you want to see it on every page then you have to add it. However, you can use BaseLayout with added items from the section to avoid it.

Yes, I think the ItemsFromSubPage would work.

Thanks.

Baidaly
Oct 23, 2013, 3:19 PM
Can you clarify, can we close this thread?

edip
Oct 23, 2013, 4:20 PM
Can you clarify, can we close this thread?

I have not had a chance to try it, but sure. close this thread.

Thanks

Baidaly
Oct 23, 2013, 6:37 PM
We will keep it open until your response.

Daniil
Oct 29, 2013, 11:57 AM
Closed. However, please feel free to update with any new info regarding the issue.