Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Category title alignment

Category title alignment

Locked

Views: 1,495

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
23 Sep 2006, 6:11 AM
#1
godt avatar

godt

Zen Follower

Join Date:
Mar 2006
Location:
Melbourne, Australia
Posts:
378
Plugin Contributions:
0

Category title alignment

On my product info page, I have the image on the left and title and description to the right. Standard fare, I think. I am trying to align the title with the top of the image, but I can find no eay to do this. Is there a simple approach?

23 Sep 2006, 6:32 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Category title alignment

While I have not applied this, in general one can move the order of things to acheive what they want. So using the override system for your template and a copy of the tpl_product_info_display.php file find this code:

<!--bof Main Product Image -->
<?php
  if (zen_not_null($products_image)) {
  ?>
<?php
/**
 * display the main product image
 */
   require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php
  }
?>
<!--eof Main Product Image-->

<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->

And change the order like this and see how it renders:

<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->

<!--bof Main Product Image -->
<?php
  if (zen_not_null($products_image)) {
  ?>
<?php
/**
 * display the main product image
 */
   require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php
  }
?>
<!--eof Main Product Image-->

If it does not produce the desired result..just delete the override file.

23 Sep 2006, 6:49 AM
#3
godt avatar

godt

Zen Follower

Join Date:
Mar 2006
Location:
Melbourne, Australia
Posts:
378
Plugin Contributions:
0

Re: Category title alignment

I end up with a real mess. Moved the title to the left of the image and above it. I have probably used css to alter the position of the image in relation to the left margin. I am thinking that rather than go back to the beginning I might put the image, title and description php in a table!! Not kosher, I know...

23 Sep 2006, 10:06 AM
#4
godt avatar

godt

Zen Follower

Join Date:
Mar 2006
Location:
Melbourne, Australia
Posts:
378
Plugin Contributions:
0

Re: Category title alignment

Guilt overwhelms me, but tables are my friend.