Need guidance on creating various renderings of a news feed please.
Hi All
I am wanting to create a news feed with various renderings
as follows
One page per news item – I know how to do this
by creating Data Types and a Document Type to support the information I want to
create and then a Template to display it as desired all on one page. Then
create Content pages to create one instance of the template per News Item
I also want to create a News Summary Page this
will list each news item one after the other with just the title and abstract
or perhaps the first few sentences of the body copy from the news item.If there is more than a defined number or
articles (say 10) then this page should also automatically display as several
pages with a pager control to allow you to navigate between the pages.I am not sure how to do this please ??? Any
pointers would be appreciated.
I also want to be able to select the top 2 (or
so) articles and highlight their content
on my home page. I am not sure how to do this please ??? Any pointers would be
appreciated.
Try to see this examples taking from the starter kit called TXT, I am sure that this can help you.
2. Yes it would be possible. There is different ways that is recommended to do this. Some recommend to use overflow:hidden in CSS where you set a hight on the the element, because then you get the whole text in the HTML, and Google loves this. In Razor, you also have the truncate method that can take x numbers of charcters and then you can add three dots. But with this solution you can risk that it will cut in a sentence.
Just want to throw my 2 cents in regarding 2 question :)
I will encourage you to consider using text-overflow - Read more about it here http://www.mobify.com/blog/multiline-ellipsis-in-pure-css/ - It has the benefit of the text not being cut of at a weird place in regards to the text that search engines and screen readers so it is beneficial for indexing and if the content is consumed by a screen reader rather than a visual browser.
Need guidance on creating various renderings of a news feed please.
Hi All
I am wanting to create a news feed with various renderings as follows
One page per news item – I know how to do this by creating Data Types and a Document Type to support the information I want to create and then a Template to display it as desired all on one page. Then create Content pages to create one instance of the template per News Item
I also want to create a News Summary Page this will list each news item one after the other with just the title and abstract or perhaps the first few sentences of the body copy from the news item. If there is more than a defined number or articles (say 10) then this page should also automatically display as several pages with a pager control to allow you to navigate between the pages. I am not sure how to do this please ??? Any pointers would be appreciated.
I also want to be able to select the top 2 (or so) articles and highlight their content on my home page. I am not sure how to do this please ??? Any pointers would be appreciated.
Thanks in anticipation.
Terry Clancy
ClanceZ
Hi Terry.
Try to see this examples taking from the starter kit called TXT, I am sure that this can help you.
2. Yes it would be possible. There is different ways that is recommended to do this. Some recommend to use overflow:hidden in CSS where you set a hight on the the element, because then you get the whole text in the HTML, and Google loves this. In Razor, you also have the truncate method that can take x numbers of charcters and then you can add three dots. But with this solution you can risk that it will cut in a sentence.
Documentation can you find here: https://our.umbraco.org/documentation/Reference/Querying/UmbracoHelper/#Truncate%28stringhtmlintlengthbooladdElipsis%29
3. Yes you can pull out the 2 newest news item or 3 if you want. Here is an example on how to take the 5 newest articles. By using the ,Take(5) https://github.com/umbraco/Starterkits/blob/master/Txt/Txt/Views/Partials/umbNewsOverviewWidget.cshtml
Hope this helps, if not, please ask again, and I can help you further.
/Dennis
Hi Terry
Just want to throw my 2 cents in regarding 2 question :)
I will encourage you to consider using text-overflow - Read more about it here http://www.mobify.com/blog/multiline-ellipsis-in-pure-css/ - It has the benefit of the text not being cut of at a weird place in regards to the text that search engines and screen readers so it is beneficial for indexing and if the content is consumed by a screen reader rather than a visual browser.
Hope this helps.
/Jan
Dennis and Jan ,
Thanks a lot for the tips.
Terry
is working on a reply...