I have a website with a blog section. Under the root blog page, i have child blogs. Example:
- Site
-- Blogs
--- Blog 1
--- Blog 2
--- Blog 3
--- Blog 4
I would like to display 2 blogs and then have a 'Show more blog' link/button to display the remaining 2 (in this example). I dont mind trying Razor but would like some guidance on how to start with this? Thanks for any advice.
At this point you would want to look at writing an Examine query for showing an initial X amount of blog posts on page load (in your example 2), then when clicking your Load More button you can send a request to then show 2 * Page Number.
By default Umbraco nodes are indexed, so it will just be about grabbing the correct nodes and getting the correct amount on the button click - you can read more about Examine here
So if i have this installed and configured, would this allow me to have a textbox to search on the page too? Just widening the power of this component, would it allow me to add tags or similar to each blog so if someone searched on "Technology" it would display all the technology blogs?
Show X number of items
I have a website with a blog section. Under the root blog page, i have child blogs. Example:
I would like to display 2 blogs and then have a 'Show more blog' link/button to display the remaining 2 (in this example). I dont mind trying Razor but would like some guidance on how to start with this? Thanks for any advice.
At this point you would want to look at writing an Examine query for showing an initial X amount of blog posts on page load (in your example 2), then when clicking your Load More button you can send a request to then show 2 * Page Number.
By default Umbraco nodes are indexed, so it will just be about grabbing the correct nodes and getting the correct amount on the button click - you can read more about Examine here
Thanks Mattew.
So if i have this installed and configured, would this allow me to have a textbox to search on the page too? Just widening the power of this component, would it allow me to add tags or similar to each blog so if someone searched on "Technology" it would display all the technology blogs?
is working on a reply...