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.

Easy way to link to first entry in a weblog?

August 20, 2007 11:43am

Subscribe [1]
  • #1 / Aug 20, 2007 11:43am

    ndicken

    10 posts

    I’m digging through the wiki and docs to see if this is possible, but maybe one of you might be able to point me in the right direction…  Right now I have a top-level nav that links to the “projects” weblog as so:

    <a href="{path={my_template_group}/projects}" title="Projects">projects

    Is there an easy way for that link to go directly to the first entry in that weblog instead of the weblog as a whole?  Similar to this:

    <a href="{path={my_template_group}/projects/first_entry}" title="Projects">projects

    I guess I could just run a weblog:entries and get the first but I wasn’t sure if there was a quicker method to do it…

  • #2 / Aug 20, 2007 12:30pm

    ndicken

    10 posts

    For reference here’s what I did (based on my newbie knowledge of EE).  If anyone has a better method I’d love to know!

    {exp:weblog:entries weblog="{my_weblog}" limit="1" dynamic="off"}
    <a href="http://{path={my_template_group}/projects/{url_title}}" title="Projects">projects</a>
    {/exp:weblog:entries}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases