X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   navbar with search (https://forum.x-cart.com/showthread.php?t=74797)

madhatter717 12-16-2016 11:54 AM

navbar with search
 
Hi guys,

I am creating a custom skin/theme module and wanted to keep the default xcart navigation bar I did want to make a small tweak to the navigation bar by adding the xcart search from the header, how would I go about adding that as a line item?

qualiteam 12-19-2016 05:54 AM

Re: navbar with search
 
It depends on the theme that you use.

The template that renders the top menu in the standard theme is this one:
skins/customer/layout/header/top_menu.twig

Crisp White uses this template file:
skins/crisp_white/customer/layout/header/top_menu.twig

However, you don't have to replace these files with yours as the files has the widget_list() function in their markup. What the function does is displaying nested PHP classes and Twig templates injected into these "lists" with the @ListChild directive.

So, if your module alters one of these themes, you can use @ListChild in your templates and widget classes to add them to "header.menu" and "header.menu.after" (Crisp White only) widget lists.

You can read more about @ListChild here:
http://devs.x-cart.com/en/basics/templates_and_interfaces.html


All times are GMT -8. The time now is 01:02 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.