Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / custom formatting in centerbox

custom formatting in centerbox

Locked

Views: 881

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
25 Jun 2007, 8:18 PM
#1
winky3d avatar

winky3d

New Zenner

Join Date:
Jun 2007
Posts:
44
Plugin Contributions:
0

custom formatting in centerbox

Using an override, I can now pull the info I want into a centerbox.
But changing the formatting... !

I'm trying to move all the text info to the right of the image.
So I need nested div tags.
But I can't add div tags within the " 'text' => " line of code.
So it always has just one div.

Any hints on how to really control how the layout is generated?

Here's the snip I'm trying to manipulate, from modules/featured_products.php.

    
$list_box_contents[$row][$col] = array('params' =>'class="featured_prods"' . ' ' . 'style="width:' . $col_width . '%;"',
 
'text' => (($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . $featured_products->fields['products_name'] . '</a><br />' . $products_price . $featured_products->fields['products_description']);
25 Jun 2007, 9:27 PM
#2
winky3d avatar

winky3d

New Zenner

Join Date:
Jun 2007
Posts:
44
Plugin Contributions:
0

Re: custom formatting in centerbox

Making progress...

Comment out the snippet show above then add this:

	$featured_image = ($featured_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $featured_products->fields['products_image'], $featured_products->fields['products_name'], IMAGE_FEATURED_PRODUCTS_LISTING_WIDTH, IMAGE_FEATURED_PRODUCTS_LISTING_HEIGHT) . '</a>';

	$featured_name = '<a href="' . zen_href_link(zen_get_info_page($featured_products->fields['products_id']), 'products_id=' . $featured_products->fields['products_id']) . '">' . $featured_products->fields['products_name'] . '</a>';

	$featured_description = $featured_products->fields['products_description'];

	echo "  <div class=content> 
		<div class=featured_prods>$featured_image</div> 
		<div class=featured_prods>$featured_name <br />$products_price $featured_description</div> 
		</div>";

And add this to your stylesheet:

.featured_prods { padding:10px; text-align:left; float:left; color: #000000}