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.

Newbie question: full entry on another section/blog

March 13, 2008 4:10pm

Subscribe [3]
  • #1 / Mar 13, 2008 4:10pm

    simsa

    14 posts

    Hi there 😊,

    i am pretty new to EE and have some probably dumb questions.
    I like to have all kinds of short entries on frontpage (site). The full entry shall be displayed in it´s section. F. e. on FP there is one article belonging to section “Blog” and one belonging to section “Design”.
    How is the url for the “Read more” link build?

    I read the quick step tut and a lot more of the docs but could not figuere it out yet…

  • #2 / Mar 13, 2008 4:27pm

    Philip Zaengle

    293 posts

    use the {url_title} variable

    ie READ MORE!

  • #3 / Mar 13, 2008 4:54pm

    serafico

    58 posts

    Excerpt from the Quick Start Tutorial:

    There are a number of ways you could link to the “article” Template. We’ll show you the one that is most search engine friendly: the {title_permalink} Variable available to the Weblog Entry Tag.

    The {title_permalink} variable uses the URL Title field to construct a nice, search engine friendly URL that is also easily readable in English. Variables, like Parameters, can also have values. In this case, you want to tell the {title_permalink} Variable to link to the “articles”
    Template, so specify the value like so:

    {title_permalink="tutorial/article"}

    Notice that the value is the Template Group name followed by the name of Template you want to link to. In general, URLs in EE are always written in this format. Here’s how to use it in a standard HTML link:

    Read More

  • #4 / Mar 13, 2008 7:11pm

    Ryan M.

    1511 posts

    How is the url for the “Read more” link build?

    <a href="http://{url_title_path=blog/index}">Read more…</a>
    <a href="http://{url_title_path=design/index}">Read more…</a>

    That is if your index template in each section has the code for a single entry. You may consider having a template named “article” in each section, in which case the links might look like:

    <a href="http://{url_title_path=blog/article}">Read more…</a>
    <a href="http://{url_title_path=design/article}">Read more…</a>

    Those links will result in href’s resembling these (I made up article names):

    http://www.site.com/blog/article/my_blog_article_name
    http://www.site.com/design/article/my_design_article_name

  • #5 / Mar 13, 2008 7:44pm

    simsa

    14 posts

    Thanks for your replys.

    Though what i do not understand right now is: how can i achiev the correct “Read more” link dynamically for each entry?

    Do i need to use conditionals?

    (I come from another CMS which filters the entries within the section. EE seems different here.)

  • #6 / Mar 13, 2008 7:50pm

    Philip Zaengle

    293 posts

    Check out the video tutorials, they helped me a lot when I first started.

    http://expressionengine.com/tutorials/

  • #7 / Mar 13, 2008 7:56pm

    Ryan M.

    1511 posts

    Well, you’re outputting these with the “weblog:entries” tag. This will be super-basic and not entirely complete (and assumes you have a field with a short name of “summary”), but let’s say you want 3 from each on the front page:

    <h2>My Sweet Designs</h2>
    <p>{exp:weblog:entries weblog="design" dynamic="off" limit="3"}<br />
      {title}<br />
      {summary}<br />
      <a href="http://{url_title_path=design/article}">Read more…</a><br />
    {/exp:weblog:entries}</p>
    
    <h2>My Blog!</h2>
    <p>{exp:weblog:entries weblog="blog" dynamic="off" limit="3"}<br />
      {title}<br />
      {summary}<br />
      <a href="http://{url_title_path=blog/article}">Read more…</a><br />
    {/exp:weblog:entries}

    The entries tags pull out the data and sho it in almost any way you want. I think they sort by date descending by default, but we could be explicit about that, if you want:

    {exp:weblog:entries weblog="blog" dynamic="off" limit="3" orderby="date" sort="desc"}
      {title}
      {summary}
      <a href="http://{url_title_path=blog/article}">Read more…</a>
    {/exp:weblog:entries}

    And believe me…you can filter with EE. I’m willing to bet it’s as easy, if not easier than the other CMS.

    If you’re not familiar with the weblog:entries tag, you may want to head back to the tutorials first, or over to Boyink’s site for a detailed walkthrough on putting a site together.

  • #8 / Mar 13, 2008 8:06pm

    simsa

    14 posts

    Thanks mdesign for you effort/help.

    so what i need to do is,
    put this kind of code into index page of “site” for each section/weblog i have

    {exp:weblog:entries weblog="design" dynamic="off" limit="3"}
      {title}
      {summary}
      <a href="http://{url_title_path=design/article}">Read more…</a>
    {/exp:weblog:entries}
    <h2>My Blog!</h2>
    <p>{exp:weblog:entries weblog="blog" dynamic="off" limit="3"}<br />
      {title}<br />
      {summary}<br />
      <a href="http://{url_title_path=blog/article}">Read more…</a>

    etc…etc…etc..

    correct? If so, it surprises me, cause that is a lot of work…

    BTW i looked at those great videos a couple of times already but they don´t say anything about “Read more” links ...

  • #9 / Mar 13, 2008 8:09pm

    Philip Zaengle

    293 posts

    The videos don’t talk directly about ‘Read More’ links, they help you understand the concepts behind them.

  • #10 / Mar 13, 2008 8:20pm

    Ryan M.

    1511 posts

    Make sure to use the docs! I’ve been using EE going on 2 years now and I’m still in the docs all the time checking things. Get very familiar with the weblog:entries tag as you will be using it all over the place!

    The trick behind the “read more” links is the url_title_path. I went to http://expressionsengine.com/docs/ and typed “url_title_path” and I ended up here.

    If I were you, I’d get very familiar with the weblog:entries Parameters page. Read that page and you will begin to understand how powerful filtering can be in EE.

    You’re getting the idea. You’ll understand after a while why I put dynamic=“off” in there. What this code means:

    {exp:weblog:entries weblog="design" dynamic="off" limit="3"}
      {title}
      {summary}
      <a href="http://{url_title_path=design/article}">Read more…</a>
    {/exp:weblog:entries}

    Is that: we will pull three entries from the “design” weblog (assuming you have a weblog named “design”. Dynamic =“off” sort of means “we don’t care where we are on the site, I want specifically what I’m asking for…so EE stay out of my way and don’t do anything automatically (sort of an “override” if you will).  We’re going to limit it to only three items. Then we output the title and summary for each of the three. THEN, EE more or less automatically makes a link to a page on which we will do something else…in this case you’ll probably want to show the whole article on the page we’re linking to.

    On an “article” template, in your “design” group, you might have the following, in its most basic form:

    {exp:weblog:entries weblog="design" require_entry="yes"}
    {if no_results}Sorry! Article not found!{/if}
      {title}
      {body}
    {/exp:weblog:entries}

    This may look simple, but really, EE can be pretty simple when you start “getting it”. Does that help you out? Cause I need to get to some work! 😉

  • #11 / Mar 13, 2008 8:26pm

    simsa

    14 posts

    Thanks again mdesign… i have to go to bed.. it is 1am here
    i swear, i read the docs a lot but ... maybe tomorrow, sorry for bothering..

  • #12 / Mar 13, 2008 8:29pm

    Ryan M.

    1511 posts

    No prob…I know how seemingly difficult it can be. You need a few lightbulb moments…and a few late nights and things start to fall into place.

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

ExpressionEngine News!

#eecms, #events, #releases