Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Section in 2 Spalten splitten

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
T.
Smarty Regular


Joined: 22 Aug 2004
Posts: 69
Location: AT

PostPosted: Mon Nov 22, 2004 7:28 pm    Post subject: Section in 2 Spalten splitten Reply with quote

Hallo Leute!

Folgendes Problem. Ich habe eine section, die sieht gekürzt so aus:

Code:

{section name=count loop=$Glossar step=2}
<tr>          
<td><strong>{$Glossar[count].Titel}</strong></td>
tr>
{/section}


jetz möchte ich, das ganze 2 spaltig machen also nicht

A
B
C
D

sondern:
A C
B D


es ist ja noch reicht einfach das ganze so:
A B
C D
zu gestalten, aber dann steh ich leider an.

gibt es in smarty sections irgendwie die möglichkeit die gesamtanzahl der einträge anzeigen zu lassen? hab zwar schon mein tutorial durchforstet aber nichts gefunden (index_next und prev nutzt nix, first und last gibt mir auch nur zurück ob gerade erstes oder letztes item).

Ansonsten wird mir nichts überbleiben als mit PHP zwei Arrays zu übergeben, die ich dann anzeige - will ich aber nicht, da auch leicht umständlich.

Hoffe jemand kennt sich aus und kann mir helfen Wink

mfg Thomas
_________________
Oppossom - Heavy rock from austria
Back to top
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Tue Nov 23, 2004 8:30 am    Post subject: Reply with quote

die gesamtzahl kriegst du mit {$smarty.section.foo.total}

wenn der inhalt deiner table-cells nicht zu kompliziert zu generieren ist (evtl. willst du bloß ein array ausgeben), dann bist du mit {html_table} gut bedient.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ZakMc
Smarty Pro


Joined: 04 Oct 2004
Posts: 182

PostPosted: Tue Nov 23, 2004 11:13 am    Post subject: Reply with quote

oder du machst einfach eine 2te section um das td
Back to top
View user's profile Send private message
T.
Smarty Regular


Joined: 22 Aug 2004
Posts: 69
Location: AT

PostPosted: Thu Nov 25, 2004 7:45 pm    Post subject: Reply with quote

danke, das mit total bringt mich schon weiter.

2. section ums td bringts ned, dann hab ich das ergebnis das ich ned haben will (immer 2 aufeinanderfolgende datensätze nebeneinander)

jetz hab ich aber das ganze mit 3 spalten gemacht und bräuchte eine funktion zum runden. gibts sowas in smarty?

mfg Thomas
_________________
Oppossom - Heavy rock from austria
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP