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.

SAEF calling, displaying

May 28, 2010 2:45pm

Subscribe [2]
  • #1 / May 28, 2010 2:45pm

    pychap

    69 posts

    Hi,

    I have been doing Ryan Ireland’s {great} EE tutorials and I wanted to try a tweak on one of the lessons. This is not a support question for them but what should be a common help request I hope.

    Having created a Sand Alone Entry Form, the post, once approved, displays on the home page at the bottom of the page in the “Letters To The Editor” section, link to the site here. What’s not covered in the tut are two real world situations: if someone writes a lengthy article it would break the design, and the typesize is smaller so it should have a link to display the entire letter on its own page. So I limited the word count and put a Read More link to fix the design prob but one problem - the link doesn’t load the specific letter, only the latest entry.

    I thought the solution might be entry_id but I can’t seem to find any support on how that’s implemented in this code block. Do I need to generate a number at the entry and then call it somehow?

    This is the code from the page you’re viewing (through above link):

    {exp:weblog:entries weblog="letters_to_editor" limit="3" disable="comments|trackbacks"}
        <div id="{switch="lcol|mcol|rcol"}">
        <h4>{title}</h4>
    <p>    </p><h5><span class="by">From</span> {author}</h5>
    <p>    {exp:word_limit total="20"}<br />
        {letter_body}<br />
        {/exp:word_limit}<br />
        <a href="http://{path=news_articles/letter_view}">Read more</a><br />
        </div><br />
        {/exp:weblog:entries}

    Grateful for any help.
    Pete

  • #2 / May 28, 2010 3:18pm

    Sue Crocker

    26054 posts

    Instead of using path, use url_title_path. That’ll add the url_title to the url and allow the single entry page to show the entry depending on which url_title is passed to it.

    Does that help?

  • #3 / May 28, 2010 3:39pm

    pychap

    69 posts

    That fixed it!

    …I can see why understanding paths in ee is so critical.

    Thank you again, and for the prompt reply!
    Much appreciated. 😊

  • #4 / May 28, 2010 3:43pm

    Sue Crocker

    26054 posts

    That’s why we’re here! Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases