what is @html.widget in nopcommerce

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
I want to know that what is @html.widget in nopcommerce. What is the use of it? Why we use it?

in nopcommerce @html.widget is used many places let we talk about one place that is in header.cshtml page.

In nopcommerce there is one line in header.cshtml. i.e.

@html.widget("header_selectors")

Now, the question is that what is the purpose of this line. Because when I am remove this line there is no change at the client side. So why it is given in header.cshtml page.

Please help me to solve this issues.

Thank You.
6 years ago
Hello,

This is not an issue.

You must open this type of question in https://www.nopcommerce.com/boards/f/5/general-support.aspx not in development

Follow below link for understanding widget functionality in nopCommerce

http://docs.nopcommerce.com/display/en/Widgets

https://dzone.com/articles/what-are-nopcommerce-widgets-and-how-to-create-one

Thanks,
Jatin
6 years ago
Thank you for your reply. And thats right that it is not an issues but this question is come in development only. because I described that even I remove that widget line then there is no effect in theme. So that remove or adding some code is done by developer only. so as per the description this question is ask in development only.
6 years ago
sksoni wrote:
Thank you for your reply. And thats right that it is not an issues but this question is come in development only. because I described that even I remove that widget line then there is no effect in theme. So that remove or adding some code is done by developer only. so as per the description this question is ask in development only.


No, You don't have knowledge about widget it will not comes under development issue.

You can learn from nopCommerce document. What is widget and how it can be used. Widget is something to display custom things in page without customization. e.g Nivo slider in nopCommerce coming from widget.

Look below code:

<div class="header-selectors-wrapper">
            @Html.Action("TaxTypeSelector", "Common")
            @Html.Action("CurrencySelector", "Common")
            @Html.Action("LanguageSelector", "Common")
            @Html.Widget("header_selectors")
        </div>

Now here is common things. Look what is mean of other lines. TaxType, Currency & Language Selectors and you can add yours custom things after those selector(dropdown) in header using header_selectors widget. So you don't need to customize in this page.

Let me know if you have any question or query.

Thanks,
Jatin
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.