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

html_table mit mehrdimensionalem Array

 
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
vetegro
Smarty n00b


Joined: 11 Feb 2005
Posts: 3

PostPosted: Fri Feb 11, 2005 2:36 am    Post subject: html_table mit mehrdimensionalem Array Reply with quote

ich möchte eine indexseite eines Linkkataloges erzeugen, wie bei dmoz.de z.B. Dazu wolte ich eigentlich html_table verwenden. Das problem ist jedoch, dass ich die Inhalte in eine mehrdimensionles Aray packen will, um einfach DB anfragen zu reduzieren.

das ganze solte dann so aussehen:
Code:

link 1                link 2
bechreibungstext 1    beschreibungstext 2
link1 link2           link1 link2


wie kann ich dies bewerksteligen?
Back to top
View user's profile Send private message
messju
Administrator


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

PostPosted: Fri Feb 11, 2005 8:48 am    Post subject: Reply with quote

soll
Code:

link 1
bechreibungstext 1
link1 link2


eine tabellenzelle sein, oder sollen das 3 zellen, die sich über drei zeilen erstrecken sein?

egal wie rum, {html_table} kann nur mit eindimensionalen arrays umgehen. eine möglichkeit wäre einen modifier zu schreiben, der aus dem mehrdimensionalen array ein eindimensionales macht. das ist aber auch fummelig.

hast du mal überlegt statt einer table ein floating layout mit divs zu machen?

also aussen einen container, der z.b. 480px breit ist.
da knallst du mit {foreach} alle deine kategorien rein. jede kategorie ist eine <div> die 160px breit ist. dann müsstest du genau dein 3 spalten layout bekommen.

ich bin jetzt nicht so der css-guru, dass ich das mal eben aus dem ärmel schüttel, klingt für mich aber nach nem schicken ansatz.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vetegro
Smarty n00b


Joined: 11 Feb 2005
Posts: 3

PostPosted: Fri Feb 11, 2005 2:06 pm    Post subject: Reply with quote

Hi messju,

ja, das soll eine tabellenzelle darstellen.
Deine Idee mit den Divs klingt gut, da ich die Seite hauptsächlich mit css und divs aufbaue. Dennoch bleibt das Problem, dass ich nicht weis, ob mit oder ohne html_table wie ich die 2 spalten hinbekommen. In PHP hab ich eine Lösung, die Frage ist nur ob sich das auc 1:1 auf SMARTY umsetzten lässt?


Jedenfalls erstmal Danke.
Back to top
View user's profile Send private message
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