2

I am working on my first EE site and also my first site in general so I am a bit new to this. However, things have been going fairly well but I need some assistance on this topic.

I am creating a tutorial site so I plan on having recent content quite frequently. I have categories set up so users can go to certain topic pages and also my most recent video is large for viewers to see. However, since the splash page is a little bit of a summary page, I want users to click into a page to view the content. Here is a link to what I am referring to http://greyscalegorilla.com/blog/

As you can see his splash page showcases all of his tutorials, and when you click on the title you go into a standalone page for just that content. I don't know what terms I would type into search engines to even start looking for how to solve this. I saw the Pages module in EE and I am not sure is that something I need to use? Just looking for a little bit of assistance so I can start looking for how to create that effect. Any help is greatly appreciated! Thanks everyone!

2

You don't need the Pages module for this, what you want is just a standard entry or post page.

You can read, 'How To Display a Channel Entry'- here on StackExchange, it deals with the same issue.

But the basics are, you want your blog links, to link to the display/post template. So from your blog view:

{exp:channel:entries channel="blog" limit="10" sort="entry_date" order="desc"}

<h2><a href="{comment_url_title_auto_path}">{title}</a></h2>
{blog}
<hr />

{/exp:channel:entries}

The {comment_url_title_auto_path} will provide the correct linking url, if you've set-up the channel details properly. If you haven't or want to just custom build the link, then use…

{exp:channel:entries channel="blog" limit="10" sort="entry_date" order="desc"}

<h2><a href="http://mydomain.org/blog/entry/{url_title}">{title}</a></h2>
{summary}
<hr />

{/exp:channel:entries}

Where entry is a reference to a template in the template_group, blog. The name can be whatever you like: entry, details, article, post, etc.

Once the basic link is established, you then need to set-up the individual post display template. I'm going to keep calling it entry.

{exp:channel:entries channel="blog" limit="1"}

<h2>{title}</h2>
{blog}
<hr />

{/exp:channel:entries}

And that's basically it. Obviously you need to style and format the page. If you aren't using a {summary} field, you probably want to limit the number of words or characters displayed on the list view/splash page. But the basic display of a full post is fairly easy, making sure you point to the right template is probably the confusing part for most newbies.

1
  • Good explanation. But I'd recommend not hardcoding an absolute URL like http:///mydomain.org/template/etc in your href attribute. It's far more portable to use a root-relative path like /template/etc or one of the ExpressionEngine path variables, like title_permalink.
    – Alex Kendrick
    Jan 1 '13 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.