[SOLVED] How do you style photo album page content type ?
Posted: Thu Nov 22, 2007 6:49 pm
Hi there,
Sorry if you've already read this. I moved it from the General Help discussions.
I have just created a new page with page content set to Photo Album. The thumb nails are displayed in a single column, which really wastes space and doesn't look too good. I would like the album thumb nails arranged side by side like the thumbnails inside each album.
I am using the default template and a copy of default album css file.
After much searching I think I found the bits of interest. From the template
The album thumbnails are placed as li elements within an unordered list with a class called albumlist.
The photo thumbnails are also placed as li elements within an unordered list with a class called picturelist.
The picturelist is implemented over two for loops rather than one, but I don't see anything that would force a new line at the end of the nested loop to explain the difference in display.
The relevent part of the css code appears to be
The only difference between the css for albumlist and picturelist is a float:left, but removing it doesn't seem to change anything
Any ideas. The code snippets are from the defaults, I haven't changed anything.
Thanks
Gill
Sorry if you've already read this. I moved it from the General Help discussions.
I have just created a new page with page content set to Photo Album. The thumb nails are displayed in a single column, which really wastes space and doesn't look too good. I would like the album thumb nails arranged side by side like the thumbnails inside each album.
I am using the default template and a copy of default album css file.
After much searching I think I found the bits of interest. From the template
The album thumbnails are placed as li elements within an unordered list with a class called albumlist.
Code: Select all
{* Album List *}
{if !$album}
<ul class="albumlist">
{foreach from=$albums item=album}
<li class="thumb">
<a href="{$album->link}">
<img src="{$album->thumbnail}" alt="{$album->name}" title="{$album->name} - {$album->comment}"{$album->autothumbnailsize} /></a>
<p class="albumname">{$album->name}<br />
<span class="albumpicturecount">({$album->picturecount} images)</span><br />
<span class="albumcomment">{$album->comment}</span></p>
</li>
{/foreach}
</ul>
The photo thumbnails are also placed as li elements within an unordered list with a class called picturelist.
Code: Select all
<ul class="picturelist">
{foreach from=$pictures item=picturesrow}
{foreach from=$picturesrow item=onepicture}
<li class="thumb"><a href="{$onepicture->picture}" rel="{$album->name}" class="thickbox" title="{$onepicture->name} - {$onepicture->comment}"> <img src="{$onepicture->thumbnail}" alt="{$onepicture->name} - {$onepicture->comment}" title="{$onepicture->name} - {$onepicture->comment}"{$onepicture->autothumbnailsize} /></a>
</li>
{if ($onepicture->number==$picturenumber and !$picture)}{assign var=picture value=$onepicture}{/if}
{/foreach}
{/foreach}
</ul>
The relevent part of the css code appears to be
Code: Select all
/* Album List UL */
.albumlist
{
margin-left:0;
padding-left:0;
float:left;
}
/* Picture List UL */
.picturelist
{
margin-left:0;
padding-left:0;
}
/* Album and Picture Lists */
.thumb
{
padding:0;
width:150px;
margin:0 0.5em 0.5em 0;
/* Thumbnail spacing */
text-decoration:none;
line-height:normal;
list-style-type:none;
text-align:center;
float:left;
}
Any ideas. The code snippets are from the defaults, I haven't changed anything.
Thanks
Gill