as far as jekyll pagination doesn't work with permalink I make my root index page display the blog posts like blog page ,
my website have a blog / questions / news / media - posts categories
so before I use the pagination it was pretty nice I was able to display specified posts in specified place with
{% for posts in site.categories['blog'] %}
in /blog.html to display blog posts only in /blog/ with permalink of course
now I move the code of blog.html to the index.html page,
and pagination works fine but display all posts blog media news
so there's any help ? or some tricks I can use to make the blog posts in multi pages with/without pagination ?
thanks in advance.
i also tried to build my page with jekyll-paginate but as the plugin is no longer under active development, i switched to octopress-paginate.
This allows us you use a simple syntax like:
{% for post in paginator.posts %}
or any other collection / page-type you have.
Related
I have a basic ecommerce site which has a products page, in which a full overview of the products is displayed, including thumbnails, brief description, etc. On the same page, and other pages on the site, there is a sidebar which lists the products by title only.
Since the sidebar is reused around the site I want to set this as an embedded template.
With this setup, must I retrieve all the products from the database twice; once in the main Products page, and again in the sidebar? Or is there any way to speed things up on the Products page by retrieving the entries once in the parent template and passing them to the embedded page?
For example:
products parent template:
<html>
{exp:channel:entries channel='products'}
// display full product info
{/exp:channel:entries}
{embed='includes/_products_sidbar' data={entries}} // ^ Can I pass all the data from the above loop to this embedded template?
</html>
embed:
{if data}
// if we already have the data available then use it without having to get it all again from the database
{else:if}
// if not then use another entries loop:
{exp:channel:entries channel='products'}
// display a list of products
{/exp:channel:entries}
{/if}
I think you are better of using a different approach. Have a look at layouts:
https://docs.expressionengine.com/latest/templates/layouts.html
or, if that's not possible, you can use stash https://github.com/croxton/Stash too.
oh yeah, you'll get better help on https://expressionengine.stackexchange.com/
I'm new to Kentico, and have spent hours trying to make the blog work but haven't had any luck. Hope someone could help. I created a new blog by [a] using Pages > New Page > Blog; [b] then applying the Blog page template to it; [c] after that I created 2 sample blog posts. The only thing that works is the individual blog post. Other things don't work:
1- the blog main page --> empty
2- the blog archive page (for July) --> empty
3- tag link --> error message "Page /Blogs/My-blog-1.aspx was not found." Although I know I can change the tag link url, not sure what should be in there.
4 - making "Blog" appears on my nav (that I used CSS List menu web part). For this one, as a workaround, I was thinking about adding a blank "Blog" page and had it redirected to the blog url.
I've read the documentation related to Blog, but couldn't make it to work. Thanks for help!
Some of the out of the box templates are setup in such a way to only work on some of the example site templates which is why you're getting these results.
In the rptAllPosts repeater, set the Path property to ./%, ensure the Page types property is set to cms.blogpost, make sure you have a value in the Transformation property as well.
Should be resolved when you finish #1
You will have to modify the Selected Transformation. If you're using the default transformation, about line 9, way at the end you will need to modify the last parameter from ~/Blogs/my-blog-1.aspx to ~/Blog. This should fix the blog tag link.
Your work-around is very common and I'd stick with it for now.
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.
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
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..