By: Andy Schmitt
Date: 2007-10-24
Time: 21:41
|
Serial display + header groups?
First off, based on the forums you hear it all the time...but your templating engine rocks! We use it now standard on all our projects and it has never let us down. Customers love being able to edit their web pages without needing to have a clue about PHP, too. :)
I've got a problem that I haven't seen an answer to on the forum or in the examples. The manual says that serial display can be used with sections of block. Suppose I wanted to display up to 4 photos in a serial display, with a date at the beginning of each set (this would be considered the header). I'm trying the code below and am not having any luck. Am I doing something stupid, or have I finally ran into something that TBS can't handle?
This works if I don't include the date as a headergrp, but if I put it in, the date gets filled in, but the first image gets passed over (I'm assuming since it already filled in the date).
<p>
[photoimages;block=p;serial;p1=[photos.business_id]]
<span><b>[photoimages_1.posted_date;block=span;headergrp=posted_date]</b></span>
<span><img align=top src="uploads/[photoimages_1.smallimage;block=span;magnet=span]" border=0 /></span>
<span><img align=top src="uploads/[photoimages_2.smallimage;block=span;magnet=span]" border=0 /></span>
<span><img align=top src="uploads/[photoimages_3.smallimage;block=span;magnet=span]" border=0 /></span>
<span><img align=top src="uploads/[photoimages_4.smallimage;block=span;magnet=span]" border=0 /></span>
</p>
|
|
By: Skrol29
Date: 2007-10-24
Time: 23:43
|
Re: Serial display + header groups?
Hi Andy,
In your template, you have two subsection names "photoimages_1" : one for the date, and one for the image. sections with same names give alternative display, but I don"t know for sure if it works with subsections.
Nevertheless, a subsection cannot be a header section. Subsection can be only like normal sections. Special parameters are ignored for them.
I can try to found another solution but I'm not quite sure about what you are trying to produce. Is it something like:
<p> DateA Img01 Img02 Img03 Img04 </p>
<p> Img04 Img05 </p>
<p> DateB Img06 Img07 Img08 Img09 </p>
<p> Img10 Img11 Img12 </p>
...
|
|
By: Andy Schmitt
Date: 2007-10-25
Time: 00:11
|
Re: Serial display + header groups?
That's exactly what I'm trying to produce. :)
|
By: Skrol29
Date: 2007-10-25
Time: 15:22
|
Re: Serial display + header groups?
Not so simple. The braking rule is strange.
I'm still on it.
|
By: Andy Schmitt
Date: 2007-10-25
Time: 19:21
|
Re: Serial display + header groups?
Skrol29, we ended up doing this for now; while not particularly clean, it looks like what the client wants.
<td>
<span><br /><b>[photoimages.posted_date;block=span;headergrp=posted_date;p1=[photos.business_id]]</b></span>
<span><img width=100 height=70 align=top src="uploads/[photoimages.bigimage;block=span;magnet=span]" border=0 /></span>
</td>
|
That gets rid of the paragraphs, but we basically forced the images to be the same size (not a problem in the production version when they actually will be), and made the table above just big enough to make the images go to the next line after 4. The BR in the header group drops us a line when a new date range starts.
Just wanted to let you know we had a workaround so you didn't waste your time on this one. Thanks for your help though!
|
|
Posting in progress.
Please wait...
|