BlogHarbor Home Page
FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  UsergroupsRSS   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Entries Listed By Title
 
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
Kyle93815



Joined: 26 Apr 2004
Posts: 39
Location: Austin, TX

PostPosted: Sun Jul 25, 2004 11:46 pm    Post subject: Entries Listed By Title Reply with quote

Hey John,

I am trying to create a list of all published articles by title only. I've been able to accomplish this by using:

{{loop name=blog.recent_articles}}

Normally, it would appear with a limit, but I removed it. Unfortunately, the absolute limit seems to be 50 articles, even without a limit statement.

Another way would be to loop the articles using the same code that generates the category pages, and just show the title. But that won't work unless you are in a category with articles, and then only for that category.

I was wondering if you knew a way to make this happen? I really appreciate your help.
Back to top
View user's profile Send private message Visit poster's website
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Mon Jul 26, 2004 9:56 pm    Post subject: Re: Entries Listed By Title Reply with quote

Not sure exactly what the question is, but here is some code that would list the 10 most recent articles:

Code:
{{loop name=blog.recent_articles LIMIT=10}}
   <div class="article">
      <div class="articleTitle">
         <a href="{{view_url}}">{{if title}}{{title}}{{else}}Untitled{{/if}}</a>
      </div>
   </div>
{{/loop}}


This code is the same but would not limit the number of articles:

Code:
{{loop name=blog.recent_articles}}
   <div class="article">
      <div class="articleTitle">
         <a href="{{view_url}}">{{if title}}{{title}}{{else}}Untitled{{/if}}</a>
      </div>
   </div>
{{/loop}}



Here's some code you could use to create a bulleted list of the most recent articles:

Code:
<ul>
{{loop name=blog.recent_articles LIMIT=10}}
   <li>
      <a href="{{view_url}}">{{if title}}{{title}}{{else}}Untitled{{/if}}</a>
   </li>
{{/loop}}
</ul>


The following code would jazz it up a bit by adding the date and time posted below the links to the articles:

Code:
<ul>
{{loop name=blog.recent_articles LIMIT=10}}
   <li>
      <a href="{{view_url}}">{{if title}}{{title}}{{else}}Untitled{{/if}}</a><br>
      <small>{{publish_time.month_name}} {{publish_time.day}}, {{publish_time.year}}
      {{publish_time.hour}}:{{publish_time.min}}{{publish_time.ampm}} ({{publish_time.zone}})</small>
   </li>
{{/loop}}
</ul>


You can use this code as part of a "Web Page" type of document, try creating one by going to the Post tab then choose Web Page from the OPTIONS row. Add one of the code examples above to a custom web page, and you can create a web page which combines static, unchanging content with a dynamically generated list of recent articles.

If this is not the answer you are looking for let me know and I'll try again. Wink
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Guest






PostPosted: Tue Jul 27, 2004 12:01 am    Post subject: Reply with quote

Hey John, sorry for the confusion. The problem is that when I remove the LIMIT part, it still limits the total articles it will display to 50. When it adds a new one, it removes one from the bottom of the list (the oldest).

I'm not sure if there is a way around this limitation. Honestly, I can't figure why there would even be a limitation.

My archive page is here: http://www.secondnegative.com/blog/Archives

I'm trying to create a list of all entries, by title.

Thanks for your help!
Back to top
Kyle93815



Joined: 26 Apr 2004
Posts: 39
Location: Austin, TX

PostPosted: Tue Jul 27, 2004 12:02 am    Post subject: Reply with quote

Whoops...forgot to login on that last post.
Back to top
View user's profile Send private message Visit poster's website
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Tue Jul 27, 2004 12:23 am    Post subject: Reply with quote

I see what you are talking about now. As far as I know, the limit would be there to prevent the servers from doubling over when requested to spit out the full text of 1000+ articles at once (yes, there are a few blogs with that many articles so this is a conceivable scenario). Since this call can pull the full text as well as any other atttribute of an article, this limitation seems like it would prevent one page load from taking up an excessively high amount of CPU time for an excessively long time.

That being said, it would be useful (understatement) to be able to at least be able to pull the full list of articles/urls for a given category. We'll look into this for you...

BTW, very nice application of these macros on that page, well done. Razz
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kyle93815



Joined: 26 Apr 2004
Posts: 39
Location: Austin, TX

PostPosted: Tue Jul 27, 2004 2:36 am    Post subject: Reply with quote

Thanks for the help John. And for the compliment! I'm having fun experimenting with what can be done.
Back to top
View user's profile Send private message Visit poster's website
Search all BlogHarbor support resources.
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> Tips and Tricks All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum