Blogs
Blogs gets a makeover!
Hi everyone,
As I continue to get my feet well under the Community table, I'm trying to make liferay.dev a more engaging and generally more useful experience for you all.
As of right now (like, a minute OK), I've launched a new experience for Blogs. This consists of two major changes:
- The Blogs listing page (liferay.dev/blogs) is now a Search Results page, rather than a page showing the Blogs Widget
- I've added a Display Page Template for Blogs, so that when you click through from the listing you'll be seeing a similar but much more up-to-date way of displaying content
Hopefully you like this new approach, but, don't worry if you like the way things used to be done - the original listing page is still available, you can get to it from the new menu on the new page, or just from liferay.dev/blogs-list!
If you don't need or want to know more, you can be done now - go grab a coffee and thank me for saving your next 5 minutes! If you do want to know more, read on...
Why a Search Page?
I'm a big fan of using Search more creatively than just as Site Search. "Why?" you might ask. Well, put simply, it gives you a way to filter, sort, and of course search though the results.
I started with the same widgets as a normal search page, then made some tweaks:
- First, the Search Options widget is configured to "Allow Empty Searches" which means all the results are displayed immediately you access the page - so, just like using the Blogs Widget.
- Next I added a "Type Facet" widget to the page, configured it to only show Blogs, and then used the option in page editor to Hide the fragment. So, now you only see Blogs, and this isn't editable by users.
- Next I added a bunch of "Category Facet" widgets, each one configured to show just one Vocabulary, and using a simple custom Widget Template to tweak the OOTB look and feel
- Finally, I created a custom Widget Template for "Search Results" to give the presentation I wanted.
So, the same listing of content you saw before, but with much more functionality.
Why a Display Page Template?
Well, to put it simply, the old display relied on the Blogs Widget, and wasn't really configurable at all. With a DPT I can fully control the information I want to display and how it is displayed!
It looks similar (by design) to the old view, just organized (in my opinion) a bit better.
Oh, and one more thing!
Just before I wrap up - there's one more thing which I think is kind of cool.
The Search Results widget template already offered this, but I extended it to the DPT as well - specifically this:
- You can filter results just by clicking on the Tags and Categories shown under the listing entry, and on the Categories and Tags on the Display Page Template as well!
Doing this simply adds the Category or Tag ID to the URL, and either refreshes the search page with that Category or Tag preselected, or redirects to the search page if you're viewing the DPT.
Anyway - that's it for now - if you have comments, you can add them on the DPT, or just ping me!