[support] theming the output of the views module

Mohammed Al-shar' mohammed at atexplorer.com
Tue Oct 24 08:07:28 UTC 2006


hi again listers.

first I want to apologize for the tune of the previous email. I try to research as much as I can before I post.

I have successfully produced a block with the latest 3 sticky posts using the views module as some of you suggested. all is well, i chose to view the results in a "table view" and I also got this. now, can I theme the output of that block? I don't want the results to be displayed each in a row, with the title taking the first collumn and the teaser taking the second. instead I wanted three boxes next to each other, not above each other.

to clerify this further I baste below the output of the block generated by the views module, and then below it what i possibly want to achieve.

/*** the output of the views module:
<div class="block block-views" id="block-views-highlites">
    <h2 class="title">Highlites</h2>
    <div class="content"><div class='view view-highlites'><div class='view-content view-content-highlites'><table>
 <thead><tr><th id="view-field-node_title" class="view-cell-header"></th><th id="view-field-node_body" class="view-cell-header"></th> </tr></thead>
<tbody>
 <tr class="odd"><td class="view-field view-field-node_title"><a href="/index.php?q=node/1">nattiq website on the way</a></td><td class="view-field view-field-node_body"><p>just to keep everybody updated, Nattiq new website is on the way!</p>
</td> </tr>
 <tr class="even"><td class="view-field view-field-node_title"><a href="/index.php?q=node/3">this is a test story</a></td><td class="view-field view-field-node_body"><p>this story is for test purposes.<br />
it's sticky and promoted to front page.</p>
</td> </tr>
 <tr class="odd"><td class="view-field view-field-node_title"><a href="/index.php?q=node/4">views module rocks!</a></td><td class="view-field view-field-node_body"><p>just what the title says</p>
</td> </tr>
</tbody></table></div>

/*** what I want to achieve in a poor design I know, but just to pass the idea:

<table width=300" hight="100" cellspacing="5" cellpadding="0">
<tr>
<td width ="100">
the first story's title 
</td>
<td>
the second story's title
</td>
<td>
the third story's title
</td></tr>
<tr>
<td>
 the first story's teaser
</td>
<td>
the second story's teaser
</td>
<td>
the third story's teaser
</td></tr>
</table>

is this possible to achieve roughly?

thanks alot.
Mohammed al-shar'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20061024/2be01585/attachment.htm 


More information about the support mailing list