Forums / Templates, Stylesheets, Page Layout / Changing layout of subcategory

Changing layout of subcategory

Locked

Views: 970

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
28 Jul 2009, 1:19 PM
#1
rgerards avatar

rgerards

New Zenner

Join Date:
Oct 2008
Posts:
10
Plugin Contributions:
0

Changing layout of subcategory

Hi,

I have the following website :

http://www.spellendump.nl/index.php?main_page=index&cPath=1

and as u can see, the alightment of the pictures is horrible. I do not know much about about coding, so Iam hoping u guys can help me figure out how to make this look better.

Iam also in the process of making some small changes to the layout and the banner and are generally pretty content with it.

Any other suggestions are offcourse also very welcome.

Remco Gerards

28 Jul 2009, 1:29 PM
#2
aliepinieks avatar

aliepinieks

Zen Follower

Join Date:
Jun 2009
Location:
Brisbane, QLD AUS
Posts:
209
Plugin Contributions:
0

Re: Changing layout of subcategory

i assume you want them all centered vertically rather than aligned to the top of the row?

if so, and if you don't know much about coding then this will probably take a while as the div based layout will definitley require some code changes, but please elaborate on why you think it looks 'horrible' and perhaps i can help.

cheers
andy

28 Jul 2009, 1:36 PM
#3
rgerards avatar

rgerards

New Zenner

Join Date:
Oct 2008
Posts:
10
Plugin Contributions:
0

Re: Changing layout of subcategory

well, the pictures decide where the text is, so its look a bit weird. Maybe I could edit all the pictures and just make them all the same size with some transparancy. Some sort of raster layout would be nice.

28 Jul 2009, 1:53 PM
#4
aliepinieks avatar

aliepinieks

Zen Follower

Join Date:
Jun 2009
Location:
Brisbane, QLD AUS
Posts:
209
Plugin Contributions:
0

Re: Changing layout of subcategory

now that i've thought about it, you could try this...

  1. find the file at location: includes/modules/category_row.php
  2. change the existing code (default template is line 39) from:
  • $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>');

...to...

  • $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<div style="position:absolute;bottom:0;width:100%;padding:0;margin:0;">' . $categories->fields['categories_name'] . '</div></a>');

unfortunately my own site seems to have gone down temporarily, so i wasn't able to test this. see how you go.

cheers
andy

28 Jul 2009, 1:58 PM
#5
rgerards avatar

rgerards

New Zenner

Join Date:
Oct 2008
Posts:
10
Plugin Contributions:
0

Re: Changing layout of subcategory

this seems to have removed all the text under the pictures.

28 Jul 2009, 2:14 PM
#7
aliepinieks avatar

aliepinieks

Zen Follower

Join Date:
Jun 2009
Location:
Brisbane, QLD AUS
Posts:
209
Plugin Contributions:
0

Re: Changing layout of subcategory

just looks like css to add the borders, but still suffers from the same problem as you (although the images aren't so varied in size so the problem isn't amplified like yours).

i seem to be having a brain fade right now, but will get back soon with a solution : )

i hope !

andy

28 Jul 2009, 2:34 PM
#8
aliepinieks avatar

aliepinieks

Zen Follower

Join Date:
Jun 2009
Location:
Brisbane, QLD AUS
Posts:
209
Plugin Contributions:
0

Re: Changing layout of subcategory

ok, i understand why it didn't work (i made some really bad assumptions!).

try this, but don't be surprised if it wrecks the whole layout as i don't know what css you already have defined in your stylesheet.

$list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents" style="position:relative;"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<div style="position:absolute;bottom:0;width:100%;padding:0;margin:0;">' . $categories->fields['categories_name'] . '</div></a>');

let me know how it goes!

andy

28 Jul 2009, 7:08 PM
#9
rgerards avatar

rgerards

New Zenner

Join Date:
Oct 2008
Posts:
10
Plugin Contributions:
0

Re: Changing layout of subcategory

yea, that pretty much wrecked it, it pushed all the pictures to the left side of the screen and the text is under it most of the time. Any files I can supply (like the css file) ?

Thanks for trying though, very much appreciated !

Remco