2 column entries

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

2 column entries

Post by d_cee »

Hi

I'm trying to create a layout that will allow me to show 3 columns on the page. I want the columns to show
1.Entry
2.Extended entry
3. sidebar.
In fact if you look at this screenshot I comped up http://test.daves.me.uk/images/screenshot.jpg it will explain better than I can with words.

Oh, and I want the extended entry to always show whether it has content or not.

Any help gratefully received
thanks
Dave
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: 2 column entries

Post by garvinhicking »

Hi!

That sounds like an interesting idea. Basically you'd just need to remove some {$if is_single_entry} checks to show extended entries on the same page like the usual entry ($body.extended references). Ideally you just make the .serendipity_extended_entry div element float to the right to form the new column there?

The other option if you want REAL 3 columns would be a lot harder, since you'd need to match up the rows for each entry, so that the extended entry of the next entry doesn't show up at height of the 4th entry and so on...

HTH?

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi Garvin

I'd pretty much done as you said but I still can't get the extended column to sit to the right of the entry - it wants to sit below.

my entries.tpl now has the following code

Code: Select all

div class="serendipity_entry_body">{$entry.body}</div>
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
my css is

Code: Select all

.serendipity_entry_body {
    font-family:Verdana, Arial, Geneva, Helvetica, sans-serif;
    color: #333333;
    font-size: x-small;
    font-weight: normal;
    text-align: justify;
    padding-right: 0px;
    padding-left: 0px;
    padding-bottom: 5px;
    width: 60%;
    margin: 0 0 0 10px;

}
.serendipity_entry_body_folded,

.serendipity_entry_body_unfolded,

.serendipity_entry_extended {
    float: right;
    font-family:Verdana, Arial, Geneva, Helvetica, sans-serif;
    color: #333333;
    font-size: 12pt;
    font-weight: 500;
    padding-right: 0px;
    padding-left: 0px;
    padding-bottom: 5px;
    width: 35%;
    margin: 0 0 0 10px;
}
edit: I've sorted this out. I floated the .serendipity_entry_body left then everything worked OK.

thanks Garvin
Dave
Last edited by d_cee on Mon Jun 26, 2006 3:43 pm, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Actually this is a floating issue.

Either via CSS you must make serendipty_entry_body float left (and make the xtended body not float), or youmust change your HTML to this:

Code: Select all

<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
<div class="serendipity_entry_body">{$entry.body}</div>
Looks weird, I know. But works. :-)

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Thanks Garvin

I floated the entry left and all was fine

Dave
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

If you have the theme finalized, I'd be really curious about the look! I think I've never seen a layout like this, it might be very interesting!

Keep it up and best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi Garvin

I'll let you have a look in a couple of days when I've done a bit more work on it.

kind regards
Dave
davecjr
Regular
Posts: 167
Joined: Fri Oct 29, 2004 3:09 pm
Contact:

Post by davecjr »

It sounds like this would be a nice idea for a lot of themes or an option in all themes! :lol:
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

Hi Dave

You're right, I think it does lend itself to a lot of different uses.

My original thought about this was to just use it for a commercial site I'm designing but now I'm thinking I'll maybe do a version for general release too when I've finished.

Dave
d_cee
Regular
Posts: 603
Joined: Wed Jan 18, 2006 6:32 pm
Location: UK
Contact:

Post by d_cee »

I've posted a screenshot of this theme here. The 'Highlights' column is the 'extended entry'. If anybody is interested in having a theme that works this way let me know and I'll do a general release version if there is sufficient interest.

cheers

Dave
PerfectCr
Regular
Posts: 90
Joined: Mon Nov 21, 2005 2:21 am
Contact:

Post by PerfectCr »

d_cee wrote:I've posted a screenshot of this theme here. The 'Highlights' column is the 'extended entry'. If anybody is interested in having a theme that works this way let me know and I'll do a general release version if there is sufficient interest.

cheers

Dave
That's very interesting, I'd be interested.
Post Reply