Page 1 of 1

Album: order Albums alphabetically?

Posted: Tue Sep 04, 2007 3:20 pm
by amygdela
Hello,

For a website of one of my clients I've created a dropdown menu with all albums in it, and when selected you're redirected to the correct album, as can be seen here:

http://ruudvanderveldenkunst.nl/collectie/

The relevant part of the template to create this, looks like this:

Code: Select all

{* Album List *}

{if !$album}


{section name=album loop=$categories}
<div class="album_content">
	<h3>{$categories[album].category->name}</h3>
	{if !empty($categories[album].category->comment)}<p>{$categories[album].category->comment}</p>{/if}
	{$categories[album].albums_content}
</div>
{/section}
<div class="clear"></div>

<h3>Selecteer schilder</h3>
<p>Selecteer één van de schilders om zijn werken te zien.</p>

<select name="albumlist" onchange="location.href = this[this.selectedIndex].value;">
<option value="0">Selecteer een galerij</option>
	{foreach from=$albums item=album}
	{$album->category}
	<option value="{$album->link}">{$album->name}</option>
	{/foreach}
</select>

[...]
But now my question. How I can sort that dropdown menu alphabetically on Album name? Thanks for any input,

Jasper

Re: Album: order Albums alphabetically?

Posted: Thu Sep 06, 2007 9:34 am
by amygdela
*subtle kick*

anyone?

Re: Album: order Albums alphabetically?

Posted: Thu Sep 06, 2007 10:07 am
by RonnyK
Jasper,

in some later SVN version is additional sorting available. I don't know if your sort-question is possible with that solution.

http://forum.cmsmadesimple.org/index.ph ... l#msg29747

Ronny

Re: Album: order Albums alphabetically?

Posted: Sat Sep 08, 2007 9:24 am
by amygdela
I see this functionality also is included in the current album version 0.9.2 but the problem here is it sorts the album on album_id where it should sort on album_name. Is there anyway I can accomplish that? Editing the files that are installed through the module repository in CMSMS is impossible, because the files are owned by 'apache' and not by the FTP user, and I have no SSH access to that server... What can I do? Thanks for any help!