WordPress.org

Ready to get started?Download WordPress

Forums

email-like app: posts and reading pane, how to (1 post)

  1. seej
    Member
    Posted 5 years ago #

    Hey all,

    I am trying to build a WP page very similar to email applications, where you have a listing view, and a viewing pane. The listing view is all working, with a scrollbar on the far right:

    post title | author | date
    [list of posts] [scrollbar]
    [current post, which is highlighted]
    [list of posts]
    ___________________________
    Beneath this, I want to have a single post displayed. When a user clicks a new post in the list, it should highlight, and swap out the post being viewed.

    I'm thinking the best way is with an iframe, where the post link targets the iframe in the page. However, every attempt I make to put the single.php into an iframe, and send it a post id fail.

    My link is looking like this:
    /single.php?id=<?php the_ID(); ?>" target="single-post"><?php the_title(); ?>

    My iframe is looking like this:
    <iframe src="<?php bloginfo('template_directory'); ?>/single.php" id="single-post" name="single-post" frameborder="0" height="100%" width="750"></iframe>

    Any suggestions? Should I be reversing this, so the parent page is the single page, with an iframe that has the post titles looped? Might be easier to get the highlighting happening then, because the list is never reloaded. Hm.

    Any help greatly appreciated. If you're not sure what I'm talking about here, think about how most email programs have a list of your emails, and a view pane when you click an email title.

    best,
    Seej

Topic Closed

This topic has been closed to new replies.

About this Topic