Dear Sandvox Community:
I finally figured out how to turn my front page into a blog page on my new website.
However, I can't figure out how to limit the number of blog entries that display on the front page. As I produce lots of new blog entries, it is crucial that I limit the front page to the most recent 10-20 entries. Right now, every blog entry is displaying on the front page, creating a very long first page. I can't figure out how to limit how many blog posts display. If visitors want more blog entries, they can go to the blog archive, or the blog page itself. I only want the front page to preview the most recent blog entries.
In the HTML source code, I am thinking the code that will limit the number of blog entries is here (and I would prefer to have the choice to change "last-item" to a finite number like article 10:
<div class="article i1 o last-item">
Also, I don't think I can change this <div class> through code injection, so if anyone knows of any work around, that would be fine also.
Thanks in advance.
You shouldn't need to do any code injection. Just select the Index on your home page. (You'll know you have it when a box (usually in blue) is drawn around all of the entries. Change to the Object inspector. (It will say Titles & Summaries since what you've selected, hopefully, is the Titles & Summaries Index for the collection.) In that inspector, make sure "Show at most" is checked ON and then just change the number for the maximum amount of entries you'd like to see.
You can also add a Collection Archive Index and connect it to your home page. This index will then be responsible for creating archive pages for those blog entries that aren't shown on your home page.
Thanks Terrence. I appreciate the response. I have followed your instructions, but it still isn't working (my main page still shows all blog entries even when I try to limit it to 10 posts. I even tried to limit it to 2 posts to just see if I can get a different result, but that didn't work either).
This is likely a problem I have created due to the solution I used to get the blog to work as my homepage. In essence, the only way I could get my blog page as my main page was to open my old Sandvox website in 2.0. I'm sure there is a possible code problem when I use that solution.
In 2.0, what is the easiest way to make a blog page your front page? I still feel this is the root of all my problems.
A blog is nothing more than a collection with an index. It's the index that really makes it into a blog. So, following that, here's the simplest possible blog:
make a new site, pick design you like
add a New > Empty/Text page (this will be the first blog entry page
change the new page's title to "first blog entry"
click back on the Home Page
add a Titles & Summaries Index
in the Titles & Summaries inspector, change the Layout pop-up to the fourth option (full articles)
that's basically what New > Blog does, but in this case we're making the Home Page be the parent collection which displays the index.
I have experienced the situation of having *all* posts appear on the Home page when converting a Sandvox 1 site to Sandvox 2. With Sandvox 1 it was possible to have a Blog Collection show a limited number of post titles on the Home page. When this is converted to Sandvox 2, the object on the Home page displays all the posts as they are displayed in the object of the Blog index page. To limit the number of post on the Home page with Sandvox 2, I've found I need to select the object on the *Blog* index page (not the Home index page) and make the "Show at most" adjustments with the Blog page object. I've also found it necessary to move the "Article Length" slider from left to right for the "Show at most" adjustments to take effect.
Thanks Terrence and Member! I did Terrence's fix first, and just rebuilt my front page from scratch following his instructions and everything is now working properly.
Regarding the member's comment, I went back to my archived site, and that solution worked also.
So thanks for the followup!