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.

Single Entry Page q's

June 07, 2009 8:08am

Subscribe [2]
  • #1 / Jun 07, 2009 8:08am

    Denidorm

    15 posts

    Hi,

    Expression Engine is new for me, so forgive me my ‘noobish’ questions.

    First, I’ve built my website on a template.
    My problem is: how do I edit the template of the Single Entries?

    I have a blog, and it would be handy to be able to change the page of the separate blogposts. Another thing, maybe related: only my main page is visible on Google. How can I add my different posts to Google?
    Now the posts are visible on Google, only when the posts are on the front page. That way I’m missing a lot of traffic.

    Thx in advance

  • #2 / Jun 08, 2009 8:26am

    Denidorm

    15 posts

    Anyone?

  • #3 / Jun 08, 2009 10:02am

    Boyink!

    5011 posts

    Hi…

    You can usually figure out what template is being used by looking at your URL’s:

    <a href="http://www.yoursitehere.com/index.php/template_group/template/url_title/">http://www.yoursitehere.com/index.php/template_group/template/url_title/</a>

    I’m guessing the template is called “comments” or “detail”.

    If the site is new it could be that Google just hasn’t caught up fully yet.  I’ve had sites that take a couple of months to be fully indexed.  If your single-entries are obviously linked from your index page there’s really nothing more you need do.

  • #4 / Jun 08, 2009 2:03pm

    Denidorm

    15 posts

    Thanks for the reply.
    My url’s look like this:

    http://mysite.be/index.php/site/some_post_random_name/

    site is just the name of the template group… So I guess that means he bases the template for an individual post on the index page. If that is the case, how can I change that?

    Thanks

  • #5 / Jun 08, 2009 2:07pm

    Boyink!

    5011 posts

    OK - so it looks like the index template is being re-used.

    Can you post the code from that template?

    There’s a couple of possibilities for how to change this, but it depends on how that template has been coded.

  • #6 / Jun 08, 2009 4:04pm

    Denidorm

    15 posts

    Well, I just used one of the templates of expressionengine.
    Code from the template:

     

     

    {assign_variable:my_weblog="my_blog"}
    {assign_variable:my_template_group="site"}
    
    <link rel='stylesheet' type='text/css' media='all' href='{stylesheet={my_template_group}/site_css}' />
    <style type='text/css' media='screen'>@import "{stylesheet={my_template_group}/site_css}";</style>
    
    <link rel="alternate" type="application/rss+xml" title="RSS" href="{path={my_template_group}/rss_2.0}" />
    <link rel="alternate" type="application/atom+xml" title="Atom" href="{path={my_template_group}/atom}" />
    <link rel="shortcut icon" href="afbeeldingen/favicon.ico"/>
    
    </head>
    <body>
    
    
    
    <div id="content">
    <div id="heaters">
    
    </div>
                   
    <div id="blog">
    <div id="niettehoog">
    
    
    {exp:weblog:category_heading weblog="{my_weblog}"}
                                            <h2>{category_name}</h2>
    <p>{if category_description}<br />
    {category_description}<br />
    {/if}<br />
    {/exp:weblog:category_heading}</p>
    
    <p>    <br />
                                            {exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="15" track_views="one" disable="member_data|trackbacks"}</p>
    
    <p><div class="entry"><br />
        <br />
                                            {date_heading}<br />
     <br />
    <h3 class="date">{entry_date format=' %l, %F %d, %Y '}</h3><br />
                                            {/date_heading}<br />
                                            </p>
    
    <p><h2 class="title">{title}</h2><br />
    {summary}</p>
    
    <p>{body}</p>
    
    <p><div class="posted">Posted by <a href="http://{profile_path=member/index}">{author}</a> on {entry_date format='%m/%d'} at {entry_date format='%h:%i %A'}</p>
    
    
    
    <p><br />
                                            {categories}</p>
    
    <p><a href="http://{path=site_index}">{category_name}</a> •<br />
                                            {/categories}</p>
    
    <p>{if allow_comments}<br />
                                            ({comment_total}) <a href="http://{url_title_path=">Comments</a> •<br />
    {/if}<br />
                                 <br />
    <a href="http://{title_permalink={my_template_group}/index}">Permalink</a>  </p>
    
    <p><br />
    </div><br />
    </div></p>
    
    <p><br />
    {paginate}<br />
    Page {current_page} of {total_pages} pages {pagination_links}<br />
    {/paginate}<br />
    {/exp:weblog:entries}</p>
    
    <p></div>

    I cut a bit here and there….

  • #7 / Jun 09, 2009 6:15pm

    Denidorm

    15 posts

    help! 😉

  • #8 / Jun 09, 2009 8:38pm

    Boyink!

    5011 posts

    Sorry…got swamped with client work.

    This looks pretty straightforward which is good.

    Essentially what you need to do is create another template - call it detail, comments etc that will serve as the single-entry template.  You can copy this one as a starting point.  Once the single-entry template is in place all the links on this index template will need to be updated to point to the single-entry template.

    <a href="http://{title_permalink={my_template_group}/index}">Permalink</a>

    Will change to

    <a href="http://{title_permalink={my_template_group}/comments}">Permalink</a>

    Etc.

  • #9 / Jun 10, 2009 5:44am

    Denidorm

    15 posts

    Thank you very much, this did the trick (and pretty stupid of me not to see, it’s logic).

    Thank you!

  • #10 / Jun 10, 2009 10:29am

    Boyink!

    5011 posts

    Not a problem - glad it worked out.

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

ExpressionEngine News!

#eecms, #events, #releases