Hi there, this has been really helpful :)
Could I ask for a bit of help and find out how to customise this smippet to output a catalog category as well for panels?
thx,
Ken
Disclaimer: Accessing the information on this page means you agree to the Sites Terms of Service
I have a website where I wanted to post the full catalog grid on the homepage inside of a panel pane. While having the catalog show up "as" the homepage by going to site information and changing the homepage path to /catalog, this didn't allow for any other text to be added to the homepage. Doing some research, I ran across a post on the Ubercart forums where a guy posted exactly how to add the catalog to a panel. While the upside is that it does work, the downside is that it changes the title of the page to "Catalog"... That's "OK" though because I found a fix...
So, to add the Ubercart Catalog to a Panel Pane, simply create a New custom content, change the input filter to PHP and paste the following code into a pane:
<?php
print theme('uc_catalog_browse');
?>
Note: If you want, you can also create a mini panel and place the code inside that, then call on the mini panel from the page you want to display the catalog.
Now to fix the title. Download and install the Page Title module (If you don't have the token module, I would recommend grabbing that too...).
I am assuming you are using the panel on the home page and if so, go to Content management -> Page title. Change the Frontpage: field to whatever you want for the homepage. (I would recommend leaving | [site-name] after the title you setup. Hit Save configuration and that's it!
If you are using the panel on a page other than the home page, then you must edit the "Panel" content type. Look for the Page Title Settings fieldset and put the check next to Show field, saving the content type when you're done. Go to the panel page you want to change the title for and you will have an extra "Page Title" form field to change the title of the page!
Note: If you want to get rid if the annoying Catalog title that ends up showing up on the page, you can hide it using CSS (probably theme dependent):
<style type="text/css">
h1.title {
display: none;
}
</style>
If you want to add another title for the page (recommended) just create a new one using the h1 tag and stick it in a top panel pane (you might have to apply some css properties to it)
Hi there, this has been really helpful :)
Could I ask for a bit of help and find out how to customise this smippet to output a catalog category as well for panels?
thx,
Ken
Very Goood !
Yoru solution work great !
Thank for sharing.
Post Comment