Adding blog to specific page using Orchard CMS - orchardcms

I need to add existing blog to page. How I can do that?
I have page with layout and I need to add blog with pagination for it.

You can create a query with for content type blog posts as a filter and then you can add a projection widget based on this query to your page layout.

Related

Add layout for all blog posts Orchard CMS

I'm trying to add layout for all blog posts. I have added part Layout for BlogPost content type. Now I can add layout for blog post one by one. So, how I can add existing layout for all blog posts in blog?
You should create a Layout from /Admin/Contents/Create/Layout, save it and then in your blogposts, use the option "Use existing layout: " in order to get your layout.
You can do it by adding new layer with ContentType rule, like this:
ContentType("BlogPost")
Then you can add your blog post special widgets to this layer including a Layout Widget, as you want.

How to link to an individual web content item in Liferay?

Let's say that I am using an AUI Carousel to display a news item slideshow.
This is a typical slideshow - a series of images with overlay text and each image/overlay text links to a web content article for the site's news.
It seems that with Liferay 6.2, it's only possible to link to a page containing the article rather than the article itself.
How does one link to an individual article?
The solution here is to use a Display Page; starting with Liferay 6.1, there is the concept of Canonical URLs (see here).
In order to use this, you need two things:
an asset publisher page (in my example here, the page is called News)
when creating the web content item, set the Display Page to the above (News)
Now the content item can be referred to via: http(s)://<site-url>/-/<web-content-item-url-title>
So, if I have a web content item with the name Come Join Us For Lunch, and a site url of http://my-site.com/, the canonical URL for this web content item will be http://my-site.com/-/come-join-us-for-lunch
However, you should always get the actual url-title from
JournalArticle.getUrlTitle()

How to change orchard blog home page list view/summary view

I have Orchard 1.7 setup with blog recipe.
The home screen display a list of blog posts.
I want to override the way the content is displayed in summary view. I could do this for each parts. But my styling is such that I need to wrap title, body, and meta tags with a special div when ever the display type is summary.
The problem is:
After shape tracing I understood that the template used in the home page (summary) is same as the detailed one.
Content.cshtml
For detail view I want to use the default core-> Views/Content.cshtml but for summary I need to supply my own. How can I do this?
OR
How to write a driver/widget to the home page. I know how I can do this for parts/fields/modules but I don't have an idea on how to create a driver for Blog home page.
Whenever I add a widget to the homepage the default blog post list still get displayed.
Just create a file called Content.Summary.cshtml in your theme. This will target all summary views, so if you have more than just blog posts on your site you will probably want to have Content-BlogPost.Summary.cshtml.
I wrote a small blog post on Item templates in Orchard if you are interested... http://arkleseizure.net/what-the-hell-is-an-item-template

How to Group Sub Pages in Orchard CMS

I'm wondering if there's a way in Orchard or a plugin/module that anybody knows of that will let you create subpages in Orchard such that when I go to content -> pages I'm not looking at a huge list of pages; I want to see a list of main pages with their sub pages grouped under them?
Is this possible?
On a related note...when you're working with a navigation widget (that uses a menu) I want to highlight the main item as a current nav item when I'm on a "subpage".
For example, my Company page has a separate leadership page that I would want to highlight the company nav bar item (since leadership is a subpage) when you're on it.
Any recommendations would be very helpful. Thanks!
There are many ways you could achieve this in Orchard:
You could use blogs and blog posts:
Blogs are parent pages
Blog Posts are child pages
Blog posts can have URL that consists of blog's URL which you can use to create your menu.
You could also use Orchard.Lists module which enables you to add Containable and Container parts to get the functionality similar to blogs, but for other content types. You can check the tutorial on how to do it here
You could use Orchard.Taxonomies module to create a hierarchy of pages and use taxonomies for your menu
Lastly, you can do this manually by using ordinary pages and giving them hierarchically named slugs (for example parent page could have URL /parent and child page could have slug /parent/child). You could then manually create a menu that is hierarchical and consists of pages you created and use slugs to highlight your parent pages in menus..

In Orchard CMS, how do I customize the Blog widget?

I'm still new to Orchard and don't quite understand how it fits together.
The home page shows a blog post list, which is what I want. Except that right on top of the list is a summary of the blog. I only want the blog entries to show and not the general blog summary/header.
How do I customize the Blog widgets(?) to not show the summary/header?
I am using a custom derivative of the "TheThemeMachine" theme.

Resources