3 replies [Last post]
Miso's picture
Offline
Joined: 08/10/2007
Juice: 134
Was this information Helpful?

I am trying to embed the uc_catalog_block content into an existing block, so that the "Catalog" with all categories and subcats listed actually is one of the sub-menus in an existing block... is that even possible, or does catalog block have to stand out on its own?

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: uc_catalog_block creation and embedding?

There's nothing really special about the code used to make the Catalog block, so you can copy certain parts of uc_catalog_block() and put it anywhere you like to get the same results. The parts you need are lines 284-305. The $content variable then contains the themed menu links of the Catalog block.

If you're trying to get it to behave like a real Drupal menu, that isn't going to work too well. The catalog block is just a list of links that happen to be nested according to the taxonomy structure. The menu module only knows about the /catalog page.

psynaptic's picture
Offline
Early adopter... addicted to alphas.Not KulvikTheminator
Joined: 08/28/2007
Juice: 731
Re: Re: uc_catalog_block creation and embedding?

Is it possible to make Ubercart create it's own real Drupal menu? There has been call for this elsewhere (i.e. users of DHTML menu). One could create a Drupal menu and add anything they like but they would have to manually update the menu each time a new menu item was needed.

druru's picture
Offline
Brain Stormer
Joined: 08/08/2007
Juice: 228
One could create a Drupal


One could create a Drupal menu and add anything they like but they would have to manually update the menu each time a new menu item was needed.

Actually, i don't think that's 100% accurate. The catalog could probably be designed to automatically create a "drupal menu" instead of just hyperlinks.

Then you *could* manually add what ever you want to it.

It would mean most of the menu work was handled automagically for your products but that you could then manipulate the menu when you needed.

I'm not sure how to do this, just saying that it probably can be done.