Page 1 of 1

editing details view templates

Posted: Sat Aug 18, 2012 2:03 pm
by davidagbr
Hi,

I would like to try my hand at editing one of the details view templates. However, I don't know HTML, and so I was wondering if anyone can help me.

Basically, this is what I am wanting to do:

Using the basic "Collection" template in CDpedia, I'm wanting to add track numbers to the tracklisting, so that tracks are listed like this:

1. Track Title
2. Track Title
3. Track Title

and so on. Then for compilation albums, I want the tracklisting to be like this:

1. Track Artist: Track Title
2. Track Artist: Track Title
3. Track Artist: Track Title

So, adding leading numbers, a colon after the track artist, and the removal of the hyphen that automatically appears.

Any advice would be most gratefully received!

David

Re: editing details view templates

Posted: Sat Aug 18, 2012 5:30 pm
by FineWine
Have a look at Bruji's excellant tutorial on creating editing a Template http://bruji.com/howto/creating_templates/ then come back. No question too dumb.

Cheers

Re: editing details view templates

Posted: Sat Aug 18, 2012 7:39 pm
by davidagbr
Thanks FineWine, I had already read that page, and sadly was none the wiser!!

David

Re: editing details view templates

Posted: Sun Aug 19, 2012 5:37 am
by Conor
You want to find the tracks section of the collection template that looks like this:

Code: Select all

<!--IFtracks
<div class="tracks">
	<table width="100%">
		[tracksBegin]
			<tr>
				<td>IF_Tartist[track:artist]  –  END_Tartist[track:name]</td>
				<td align="right">[track:duration][durationSeparation: (*)]
				</td>
			</tr>
		[tracksEnd]
	</table>
</div>
ENDtracks-->
Update the track line format right in the middle (between the TR tags) to the following:

Code: Select all

			<tr>
				<td>[track:position]. IF_Tartist[track:artist] : END_Tartist[track:name]</td>
			</tr>

Re: editing details view templates

Posted: Sun Aug 19, 2012 4:39 pm
by davidagbr
That's worked like a charm... many thanks Conor!!

Maybe you could help me with another one?

I would like to (if possible), have the tracklisting separate multi disc sets into individual discs, with a disc number header. Like this:

Disc One (in bold)
1. Track title
2. Track title

Disc Two (bold again)
1. Track title

Is this possible? I would ideally prefer the numbers in the disc headers to be words, but at a push I could cope with digits! In between discs, I would like either a blank line (as in the above example), or a single hyphen.

If you can help, again, I would be very grateful.

David

Re: editing details view templates

Posted: Mon Aug 20, 2012 4:12 am
by Conor
Glad you were able to implement that and modify the default template. CDpedia has slowly grown to handle multiple discs and the system had to be compatible with the previous version's templates; hence, the template system is not capable of breaking the tracks export by disc. Unfortunately, there is no extra discs loop inside the tracks loop that would allow for a disc header in the template. I have written down your suggestion and will keep it in mind when updating the template system in the future.