Someone asked how to get (on a single entry page) a sidebar with links to the latest other articles by the same author. Below are a couple of examples of how to go about doing this. These aren’t the only ways though, just a couple that might be of help to people at some time or another.
One way of getting this sort of thing happening on your single entry page is to use an embedded template.
Single Entry Page - Side Column
{exp:weblog:entries weblog="blog" limit="1"}
{ embed="more-by-this-author" author_id="{author_id}" }
{/exp:weblog:entries}
NOTE - You will need to take out the spaces shown in the { embed } part of the code above as the WIKI is stripping the tag otherwise.
More By This Author Template
{exp:weblog:entries weblog="blog" limit="3" orderby="date" sort="desc" author_id="{embed:author_id}" dynamic="off"}
<li><a href="{url_title_path='details'}">{title}</a></li>
{/exp:weblog:entries}
Only problem that you might see with this is that you could very possibly get the same entry that you are currently viewing listed in the sidebar if it is the latest entry. This may or may not be a problem and if you don’t mind seeing the same entry that you are currently viewing in the list then you can ignore the rest of this WIKI article and just use the code shown above.
If this is something that you want to get rid of though then it can be overcome by just sending along another variable to the embed which holds the entry_id or something and then using that in the weblog parameter of the embed to not bring back that entry so something like this instead :
Single Entry Page - Side Column
{exp:weblog:entries weblog="blog" limit="1"}
<h1>{title}</h1>
{ embed="more-by-this-author-embed" author_id="{author_id}" not_entry="{entry_id}" }
{/exp:weblog:entries}
NOTE - You will need to take out the spaces shown in the { embed } part of the code above as the WIKI is stripping the tag otherwise.
More By This Author Template
{exp:weblog:entries weblog="blog" limit="3" entry_id="not {embed:not_entry}" orderby="date" sort="desc" author_id="{embed:author_id}" dynamic="off"}
<li><a href="{url_title_path='details'}">{title}</a></li>
{/exp:weblog:entries}
The dynamic=“off” parameter in the embedded template in both examples above is important here otherwise the embedded template will get its details from the URL of the page embedding it and so you would still only get the one entry so definitely leave that in there.
Hope that helps.
Best wishes,
Mark
