3217 Posts in 853 Topics by 812 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 845 Views |
-
Best way to extract excerpts from one or more page and use it in the home page

3 November 2009 at 2:15pm
Hi Guys
I am trying to extract excerpts from different pages and use them on the home page. The pages include a static html page, a blogging module page and a calendar events??
Any Suggestions??? -
Re: Best way to extract excerpts from one or more page and use it in the home page

6 November 2009 at 3:08am
If you have a page called MypPage you could get the content of certain fields if you add this code to your Page.ss.
<% control Page(MyPage) %>
$ContentSomethingFromMyPage
<% end_control %>A static HTML page: turn it into an statichtml.ss store it in .themes/yourtheme/includes folder and use <% include statichtml %> in your page.ss
Have a look at:
- http://doc.silverstripe.org/doku.php?id=built-in-page-controls
- http://doc.silverstripe.org/doku.php?id=templates
- http://doc.silverstripe.org/doku.phpFor getting content from a series of pages, start with:
- http://doc.silverstripe.org/doku.php?id=recipes:displaying_five_latest_pages_from_multiple_pagetypes
- http://doc.silverstripe.org/doku.php?id=recipes:gallery (you could adapt this for other uses as well)I suspect that for the blog there are some other ways to do that as well, for example with a widget (look in the widget-section)
Now If you want to add next and previous buttons and pagination then you have to add more code and a different query to get that going, but I think you will have to experiment with this first.
-
Re: Best way to extract excerpts from one or more page and use it in the home page

6 November 2009 at 11:59am
Thanks for that bud..will give that a shot..
| 845 Views | ||
|
Page:
1
|
Go to Top |

