Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 03:34:11 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155542 Posts in 21714 Topics by 7737 Members
Latest Member: simpleguy3
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: News v3.5  (Read 534 times)
ircsurfer

Offline Offline

Posts: 19


« on: February 26, 2011, 02:59:36 AM »

I am working on a website and want to duplicate a news page simailar to http://www.savelakewood.com/blog/ I am trying to achieve 2 or 3 rows not just one. I have having trouble getting the loop to work right. Any help please
Logged
snark
Guest
« Reply #1 on: February 26, 2011, 11:42:27 PM »

Throw away the table layout and use divs instead, some puzzling with borders and stuff will let you create domething very similair
Logged
ircsurfer

Offline Offline

Posts: 19


« Reply #2 on: February 26, 2011, 11:53:15 PM »

Thats not the problem im having. The problem is with the php code for the loop, i can get it to display with divs, but i cannot figure out the php portion to display in say 2 rows
Logged
tiggerific

Offline Offline

Posts: 25


« Reply #3 on: February 27, 2011, 01:09:04 AM »

snoork is right. If you want to display multiple columns like that example page, wrap each news loop in a div and use css to make the div a set width and floated left. Each post will then "float" to the right of the previous post until it runs out of room, at which time it will then float to the next row.

If that's not the answer you're looking for, you might need to post a mockup of what you're trying to achieve.
Logged
NorHei
Forum administrator
*****
Offline Offline

Posts: 485


WWW
« Reply #4 on: February 27, 2011, 02:47:29 PM »

The problem is that you need a second display loop do create a 2 or 3 row layout, so you have to modify the output functions of the News Module.

A far more easy Solution would be to modify the Anynews Snipit and use it to display your Newspage.
As far as i know you can even create custom templates for it but i am not sure if it allows 2 colums by default.
there is a detailed help packed into the .package.

I remember seeing a css solution for such a 2 Row Problem :
Code:
<div style="width:400px;border:1px solid red">
<div style="width:180px;border:1px solid green;float:left">
    BLAdfs dsfl lkdjf lsdfj<br>
    sdfkjkdsf jfdsj ljdfs dsf<br>
    dsfsdfsdkjll lsdlfkjs ll
</div><div style="width:180px;border:1px solid green;float:left">
    BLAdfs dsfl lkdjf lsdfj<br>
    sdfkjkdsf jfdsj ljdfs dsf<br>
    dsfsdfsdkjll lsdlfkjs ll
</div><div style="width:180px;border:1px solid green;float:left">
    BLAdfs dsfl lkdjf lsdfj<br>
    sdfkjkdsf jfdsj ljdfs dsf<br>
    dsfsdfsdkjll lsdlfkjs ll
</div><div style="width:180px;border:1px solid green;float:left">
    BLAdfs dsfl lkdjf lsdfj<br>
    sdfkjkdsf jfdsj ljdfs dsf<br>
    dsfsdfsdkjll lsdlfkjs ll
</div><div style="width:180px;border:1px solid green;float:left">
    BLAdfs dsfl lkdjf lsdfj<br>
    sdfkjkdsf jfdsj ljdfs dsf<br>
    dsfsdfsdkjll lsdlfkjs ll
</div>
<div style="clear:both;"></div>
</div>

You have an outer Box whith fixed width , and some inner boxes whith slightly less than half of that width and all float left. Not sure if this functional on all browsers.
« Last Edit: February 27, 2011, 02:49:41 PM by NorHei » Logged

It is easier to change the specification to fit the program than vice versa.
snark
Guest
« Reply #5 on: February 27, 2011, 08:44:37 PM »

Once again,

Throw away table elements in post header, post loop and post footer...

Then put in post loop

<div style="width:200px;height:300px; margin-right:0px;float:left;">[title][content][all other placeholders]</div>


Depending on the width of your contentdiv or table you will have 2or three columns....


As anyone Will know, change the style options to your needs or liking

Absolutely no need for àn extra loop

If you need à part of THE page to be three and ànother part to be two columns you should dive into THE possiblities of anynews (learn how to use the htt files within anynews, read the help file until you understand it)
Logged
NorHei
Forum administrator
*****
Offline Offline

Posts: 485


WWW
« Reply #6 on: February 27, 2011, 11:00:44 PM »

If you want it the table way there is nothing else but using 2 loops.

At least he needs a Box around all this and a "clear:all" at the end. Or he may run into lots of unexpected results depending on what template he is using . Whidth should be slightly less than half (third)
of that box to avoid any trouble whith certain browsers.
Logged

It is easier to change the specification to fit the program than vice versa.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!