X-Cart 5: Target and View.
Can somebody explain ( or give a link ) how to assign a view to an action? I have a controller and I can call any its action, but I don't understand how to assign a view and template to these actions.
|
Re: X-Cart 5: Target and View.
Hi Dewiar!
I can explain, but I need to get a bit clearer idea of what you are trying to achieve. Could you please explain your task in more detail? Thank you. |
Re: X-Cart 5: Target and View.
I want just display some content for my target (Controller).
I have analyzed controllers of some modules and saw that almost all controllers have View which returns default template. Also i found records in table view_lists. Then i made the same structure, but when i call cart.php?target=bbb&action=ccc I see only the title which i define in getTitle() method. So, I don't know why content is empty and my View class isn't used. Thanks for response. |
Re: X-Cart 5: Target and View.
Hello!
Just to confirm: is it the XC5 question, or is it the "LiteCommerce 3 core v1.0.14" question? :-) Anyway, in most cases LC3/XC5 controllers do not decide what view is to be shown to the visitor. They just perform requested actions and prepare some data if asked by the view. The default view renders the page layout and displays other views (widgets) added themselves to the "center" view list. For example, check the XLite\View\AccessDenied widget that adds itself to the "center" view (see the @ListChild (list="center") directive) and appears for the "access_denied" target. |
Re: X-Cart 5: Target and View.
Yes it's XC5.
I already have @ListChild directive. Maybe there is another issue. Take a look at my View please: Quote:
|
Re: X-Cart 5: Target and View.
Hi Dweiar!
What you are trying to achieve is described in this article: http://kb.x-cart.com/display/XDD/Webinar+1+-+18+Mar+2014+-+developing+modules+for+X-Cart+5#Webinar1-18Mar2...ewsdetailspage Please check this out and let me know if there are any additional questions. Tony. |
All times are GMT -8. The time now is 06:43 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.