Sign up |
Thanks for posting.
It is possible to display two lists on one page.
To start with, though, I recommend simplifying and focusing specifically on a page that lists all your blog posts.
Don't add anything about categories or single records or multiple lists.
Just build a page that lists all your blog posts regardless of category.
Once you have that, attach a copy of your file (instead of pasting code into a post), and I can review from there.
Does that make sense? Let me know any questions or feedback.
I've build a page that simply lists all blog posts, see file attached please.
The result in the browser: http://pretecho-opleiding.be/blogtest.php
One approach might be to set up a way to identify the different groups of blogs. I usually do that by setting up a multi record "Categories" section with a "Category" text field.
Next, set up a pull down list field in my blog section that gets its values and labels from the "Category" field in the "Categories" section, make it a required field, and "assign" each blog story to a particular category with that pull down. (this keeps everything nice and uniform, so searches don't go awry.)
Next on they blog list viewer, set up a similar pull down that gets its values from the Category field in the Categories section, (also make this a required choice using error checking) so that the visitor can choose from the same category list.
You can then use that choice to set a 'where' value to limit the blog posts shown to only that category.
It's pretty easy once you get going, and there's a lot more on the details in my CMSB Cookbook recipes.
Thx for the help, much appreciated !
When you say: "You can then use that choice to set a 'where' value to limit the blog posts shown to only that category." I'm wondering what the 'where' statement should look like... could you give me an example pls ?
For the moment I have a working solution with a jump menu, see below, but your solution would be nicer I think...
<select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
<option value="">Kies een rubriek</option>
<?php foreach ($pe_blog_rubriekenRecords as $record): ?>
<option value="blog.php?rubriek=<?php echo urlencode($record['title']) ?>"><?php echo $record['title'] ?></option>
<?php endforeach; ?>
I'm not able to access any examples right now, but have a look through the recipes in the CMSB Cookbook. You'll find examples there.
If you're not a subscriber, you can get a trial subscription. just follow the link below.
Just wanted to check in on how you are making out with your blog.
Did you find what you need in The Cookbook?
Let me know if you still have any questions.