ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

link to weblogs

April 01, 2008 7:30pm

Subscribe [3]
  • #1 / Apr 01, 2008 7:30pm

    doniphan

    4 posts

    Hi,

    I’m fairly new to using EE and I’ve stumbled on a problem.  I’ve set up 2 weblogs, one for a snippet of an article and another for the whole version of the article.  My problem is, how can I link to the full articles from the title of the snippet version to the full version?  They both have the same Titles. To better understand what I mean heres a link to our site:

    website

  • #2 / Apr 01, 2008 7:57pm

    PXLated

    1800 posts

    Looks like you solved it…seems to be linking, at least for me.
    —————

    Kind of curious why you’re using two weblogs when one would do? In the main weblog, just add a summry field for the short version.

  • #3 / Apr 01, 2008 8:02pm

    Mark Bowen

    12637 posts

    Hi doniphan,

    If I am understanding correctly then this can be done a lot easier than you are doing at the moment. What you can do is have two fields in the one weblog and they will be called {summary} and {body} and all you will do is on the page where you wish to show the snippet is use the shorter text that you write into the {summary} field and then on the page where you wish to show the full text you will use the {body} field instead.

    Something along these lines :

    {exp:weblog:entries weblog="default_site" disable="member_detail|categories|category_fields|trackbacks" dynamic="off"}
    <h2>{title}</h2>
    <p>{summary}<br />
    <a href="http://{url_title_path=site/detail}" title="Read more on - {title}">Read more…</a><br />
    {/exp:weblog:entries}

    You would then have a template called detail in the site template group (note these can be exchanged for whatever you like though) which would have this code in it :

    {exp:weblog:entries weblog="default_site" disable="member_detail|categories|category_fields|trackbacks" dynamic="on"}
    <h2>{title}</h2>
    <p>{body}<br />
    {/exp:weblog:entries}

    Hope that helps a bit?

    Best wishes,

    Mark

  • #4 / Apr 01, 2008 8:33pm

    doniphan

    4 posts

    Thanks you guys for the fast response.  I wish i thought of the summary and body tags that will be an easy fix, but what I meant for the link to the full version is, the title of the entry is the link to the full article.  Does that make sense?

  • #5 / Apr 01, 2008 8:36pm

    Mark Bowen

    12637 posts

    Then you will just need to change things ever so slightly, try this :

    {exp:weblog:entries weblog="default_site" disable="member_detail|categories|category_fields|trackbacks" dynamic="off"}
    <h2><a href="http://{url_title_path=site/detail}" title="Read more on - {title}">{title}</a></h2>
    <p>{summary}<br />
    {/exp:weblog:entries}

    That should do it for you? 😉

    Best wishes,

    Mark

  • #6 / Apr 01, 2008 8:40pm

    doniphan

    4 posts

    Will that work if I have more than one entry loaded to the page?  The url is linking to a specific page so I’m asuming that I would have to build a page for all the entries?

  • #7 / Apr 01, 2008 8:44pm

    Mark Bowen

    12637 posts

    Hiya,

    What will happen is that because we are using the {url_title_path=""} variable then leads us to a page which would have a dynamically created weblog tag in it as per :

    {exp:weblog:entries weblog="default_site" dynamic="on" limit="1"}
    <h2>{title}</h2>
    <p>{body}<br />
    {/exp:weblog:entries}

    So when you go to that page you should only get the one article showing. I would suggest reading up on the webog tag in the EE documentation and getting a feel for what can be done with it (an awful lot actually 😊 ) and I think things should start to become a little clearer then.

    Hope some of that helps though.

    Best wishes,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases