Page 1 of 1
Display: inline for albums in Album
Posted: Sun Sep 07, 2008 2:22 am
by kanjigirl
I'm using the Thickbox template for Album. I'd like my albums to line up horizontally across the page - not vertically as they are now:
http://www.redkitecreative.com/projects/naww/index.php?page=gallery
I tried making the ul display as 'inline' but that didn't work. I see that each album on this page is in its own ul set, and I'm not sure why that's happening - it looks to me like this code from Thickbox.tpl is set to use only one ul set and repeat the li instructions for each album found.
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|escape:'html'}" title="{$album->name|escape:'html'} - {$album->comment|escape:'html'}" /></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>
Can someone help?
Re: Display: inline for albums in Album
Posted: Sun Sep 07, 2008 1:57 pm
by Greg
The template and your css look correct. Looks like you are calling the module twice in your page, each call to a different album.
To show all albums on a page, just put this code in your page content:
{cms_module module='album'}
Re: Display: inline for albums in Album
Posted: Sun Sep 07, 2008 2:32 pm
by kanjigirl
This is all I have on that page:
NAWW Gallery
{cms_module module='album'}
I have no idea why it's calling it twice...
Re: Display: inline for albums in Album
Posted: Sun Sep 07, 2008 4:06 pm
by Greg
Strange
Does your template have just the code you have listed or all of the following?
{* Include JS files. You can move this to the head of your page template if you want *}
{* Album List *}
{if !$album}
{foreach from=$albums item=album}
link}">
thumbnail}" alt="{$album->name}" title="{$album->name} - {$album->comment}" />
{$album->name}
({$album->picturecount} images)
{$album->comment}
{/foreach}
{else}
{* Photo List *}
{$album->name}
{$album->comment}
Click on a thumbnail to view a larger image. Click on the larger image, to close it. {if $returnlink}Return to the album index page{/if}
{if $pagecount>1}
<<
{if $link.page.previous}< {/if}
page {$pagenumber}/{$pagecount}
{if $link.page.next} >{/if}
>>
{/if}
{foreach from=$pictures item=picturesrow}
{foreach from=$picturesrow item=onepicture}
picture}" rel="{$album->name}" class="thickbox" title="{$onepicture->name} - {$onepicture->comment}"> thumbnail}" alt="{$onepicture->name} - {$onepicture->comment}" title="{$onepicture->name} - {$onepicture->comment}" />
{if ($onepicture->number==$picturenumber and !$picture)}{assign var=picture value=$onepicture}{/if}
{/foreach}
{/foreach}
{if $picturecount==0}No image{/if}
{/if}
{if $picture->id>0}
{/if}
Re: Display: inline for albums in Album
Posted: Mon Sep 08, 2008 12:50 am
by kanjigirl
The template for Thickbox.tpl has all that - I just meant in the page itself, the only thing I've added is the H1 tag and the single call to Album.
Re: Display: inline for albums in Album
Posted: Mon Sep 08, 2008 8:30 am
by Russ
It is being loaded twice? I'd also move the album js for this style out of the album template and into the header of the page with the album. It works better.
You don't need to have the Album declaration in tags!
{cms_module module='album'}
The template code looks fine if a little old.
Russ
Re: Display: inline for albums in Album
Posted: Mon Sep 08, 2008 9:25 am
by Dr.CSS
You sure it's not called in the template and the page, because something is calling it twice, and take the s out it throws warnings...
Re: Display: inline for albums in Album
Posted: Mon Sep 08, 2008 1:52 pm
by kanjigirl
I'll check this and see - and report back. Thanks.
Re: Display: inline for albums in Album
Posted: Mon Sep 08, 2008 9:28 pm
by kanjigirl
I took the tags out of the Album declaration in the content of the page - I only have one Album declaration there.
Here's the full content of Thickbox.tpl:
Code: Select all
{* Include JS files. You can move this to the head of your page template if you want *}
<!--Thickbox stuff-->
<__script__ type="text/javascript" src="modules/Album/templates/db/js/jquery.js"></__script>
<__script__ type="text/javascript" src="modules/Album/templates/db/js/thickbox.js"></__script>
{* 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|escape:'html'}" title="{$album->name|escape:'html'} - {$album->comment|escape:'html'}" /></a>
<p class="albumname">{$album->name}<br />
<span class="albumpicturecount">({$album->picturecount} images)</span>
<span class="albumcomment">{$album->comment}</span></p>
</li>
{/foreach}
</ul>
{else}
{* Photo List *}
<h2>{$album->name}</h2>
{$album->comment}<br />
<p class="instructiontext">Click on a thumbnail to view a larger image. Click on the larger image to close it.<br>{if $returnlink}<a href="{$returnlink}">Return to the main Gallery page</a>.{/if}</p>
{if $pagecount>1}
<p class="albumnav">
<a href="{$link.page.first}" title="first page"><< </a>
{if $link.page.previous}<a href="{$link.page.previous}" title="previous page">< </a>{/if}
page {$pagenumber}/{$pagecount}
{if $link.page.next}<a href="{$link.page.next}" title="next page"> ></a>{/if}
<a href="{$link.page.last}" title="last page"> >></a>
</p>
{/if}
<ul class="picturelist">
{foreach from=$pictures item=picturesrow}
{foreach from=$picturesrow item=onepicture}
<li class="thumb"><a href="{$onepicture->picture}" class="thickbox" title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}"> <img src="{$onepicture->thumbnail}" alt="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}" title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}" /></a>
</li>
{if ($onepicture->number==$picturenumber and !$picture)}{assign var=picture value=$onepicture}{/if}
{/foreach}
{/foreach}
</ul>
{if $picturecount==0}No image{/if}
{/if}
{if $picture->id>0}
{/if}
<div style="clear:both"></div>
Re: Display: inline for albums in Album
Posted: Mon Sep 08, 2008 10:20 pm
by Dr.CSS
I meant in the template you use for that page, the album template only effects the album itself...
Re: Display: inline for albums in Album
Posted: Mon Sep 08, 2008 10:46 pm
by kanjigirl
Oh - sorry. No, it is not being called at any point in the template for the page, it's only present in the content for that page and only appears once there.
Re: Display: inline for albums in Album
Posted: Tue Sep 09, 2008 7:19 am
by Russ
Very curious, what version of Album and CMSMS are you on?
Re: Display: inline for albums in Album
Posted: Tue Sep 09, 2008 7:56 am
by Dr.CSS
You aren't by chance using a Content Type of album that came with older ver. of cmsms?...
Re: Display: inline for albums in Album
Posted: Tue Sep 09, 2008 2:38 pm
by kanjigirl
Not that I know of - this is my first time using CMSms and I downloaded the Album files a few weeks ago.