7 replies [Last post]
gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
Was this information Helpful?

I found this page on Drupal on how to theme pages using PHPTemplate. I was wondering if there was a list available for theming say cart view, checkout, or product catalog pages?

Reference:
http://drupal.org/node/190815#template-suggestions

gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
Re: PHPTemplate templates and suggestions is there any?

I've learned to theme Drupal using PHPTemplate's recognition of template files and I've read that most modules will have a list of naming conventions that could be used in making custom templates for design reasons. I just wanted to know if Ubercart had anything posted online about what i should name the template file in order to customize the output (design wise). Basically what if i wanted to go ahead and customize the css for a product catalog page, checkout, etc.

I read something about looking for theme_function names and copying that to use as my file name. But how do i go from that to having it output my CSS ids so i could customize the look? Or do I just go into the Ubercart CSS files and chop that up? If anyone could give me examples i can reverse engineer and learn the right way to go about doing things. Anyways thanks in advance to anyone whose able to respond.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: PHPTemplate templates and suggestions is there any?

The closest thing we've got will be http://api.ubercart.org for listing theme functions. However, if all you're wanting to do is adjust CSS, you can override the CSS properties defined in our module based .css files by adding the same selectors and new properties in your theme. When selectors are equal, the later properties can override the earlier, so Drupal makes sure to add the theme .css files last. Also, you can always just provide a more specific selector, and that will override the Ubercart .css properties, too.

gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
Re: Re: Re: PHPTemplate templates and suggestions is there any?

Thanks Ryan, I'll check the link out.

I wanted to layout the information on the page differently so it fits into my theme design. Also for the product images I have this image script that lets me zoom or magnify the image to show details of the product.

gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
<?phpfunction
<?php
function theme_uc_catalog_block_start() {
  return
'<ul class="menu">';
}
?>

So this is a themeable function from Ubercart API for the uc_catalog_block. If I wanted to template this function. I should make a file called uc_catalog_block.tpl.php, right? Then what i place inside would be:

function theme_uc_catalog_block_start() {
return '

And Ubercart/Drupal should be able to recognize the template file?

gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
Re: <?phpfunction

It didn't show up right but basically i repasted what was inside the

<?php
and
?>

.

zebbor's picture
Offline
Joined: 05/04/2009
Juice: 2
Some templates I use

Hi gizmatix

I use avery templates for my Drupal based projects. They works fine and are easy to install.

gizmatix's picture
Offline
Joined: 09/09/2008
Juice: 159
Re: PHPTemplate templates and suggestions is there any?

i wanted to change the layout of how the catalog presents the product thumbnails for its category etc. also i wanted to change the layout of the login, could i use tpl.php for phptemplate engine to do this? if so does anyone know where i can get the process of how to do this so i could learn. i'm almost willing to pay someone to make me basic template i could reverse engineer to learn but how much would that cost?