Little problems

Topics: Administration, General
Jan 19, 2015 at 8:37 AM
Hi All

My sites are working just I would expect after a few little errors, but I have a couple of nagging problems which I cannot seem to get rid of:

1: When a new blog post is created, there is a number 1 at the bottom of that post, how do you get rid of that number 1
2: Is there a way of auto expanding a blog post, for example when you create a post, there is always a more at the end of it so you have to click on it to read the full post, is there a where of just having the full post automatically expanded.
Developer
Jan 20, 2015 at 10:52 PM
  1. Can you specify this? There shouldn't be any number below individual blog posts. There can be a number 1 under the blog (i.e. the blog post list), but that's a pager.
  2. Look into using the Projector module (there are tutorials) and create a list of Blog Post content items yourself where you specify the display type as Detail. This will make the blog posts appear in full even in the list (not as excerpts).
Jan 23, 2015 at 8:32 AM
HI @Piedone thank you for the reply, so the little number 1 at the bottom is just a page number no dramas for that one. I will look at the projector module and see what I can come up with and will post answer in here, once again thank you for the reply.
Jan 28, 2015 at 8:53 AM
Hi @Piedone

I think I have this figured out, create the query and apply criteria etc, then create a projection page and select query most import kept forgetting to do that. It all seemed to work but the only part I cannot figure out is, it is displaying all the titles at the top of the page as shown with this link http://www.eadonline.co.uk/test I cannot figure out how to not display those titles.

I am presuming that the I hide the blog page and add blog posts in the background and the query will display them on the front end.
Developer
Jan 28, 2015 at 10:07 AM
Hmm, that's strange. Is that page fully a Projection Page? Because if yes then I don't know how you managed to display two lists, one with the titles and the other one with only the blog posts :-). But keep in mind that the blogs Projection Page is now instead of the default blog page (i.e. the default blog post list).
Jan 29, 2015 at 1:13 AM
With the Contoso theme, the "Core/Contents/Views/Content.cshtml" view is overrided by the Themes/Contoso/Views/Content.cshtml" view. Here, the "Model.Header" isn't displayed as in the default view, it is added to a specific layout zone named "SubPageTitle", and this zone is rendered through the theme "Layout.cshtml". So, because each content item is rendered via the "Content.cshtml", all Title parts are stacked in the same "SubPageTitle" zone...

Try to rename the "Content.cshtml" file in your theme with "Content-Page.cshtml", then, the specific Title implementation will be used only for "Page" content type items, not for the "BlogPost" items in your list. But here, you also loose the specific Title implementation for all other content types. If, for you, it's not a concern to loose the title implementation only for the blog post content type, then you can use another copy of the core "Content.cshtml" view in your theme, and rename it "Content-BlogPost.cshtml". Finally, you could use another alternate based on the display type: "Content-BlogPost.Detail", but your projection also use the "Detail" display type as for a normal view...

Before trying to find another solution, here, it depends what you want

Regards
Jan 29, 2015 at 9:55 AM
Hi Guys

Renaming the content-Page.cshtml seemed to work, maybe it was my fault for not mentioning earlier that I used the Contoso theme, sorry for that.

@jtkech all I wanted to do was have each blog post expanded i.e. the full post and not displayed in the short view. I tried to rename the content.cshtml file to the others you suggested but it displayed the full list of posts, but using the content-page.cshtml works so I am happy.

@Piedone, thank you for all your help.

I have now just got to update not only this site but three others as well.