1776 Posts in 498 Topics by 533 members
Blog Module
SilverStripe Forums » Blog Module » Latest blogs\news\articles
Discuss the Blog Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 707 Views |
-
Latest blogs\news\articles

31 January 2011 at 4:08am Last edited: 31 January 2011 4:09am
I didn't get any replies during a period of one week in the other section so I might as well ask here since the News and Blogs are basically the same code.
I'm not the most skilled coder, but I created a website for a client. I wanted to test out SilverStripe and though it has some annoying little things, like having to upload files on the FTP to get pages or styles to update, or flushing cache every 5 minutes, it works great.
I downloaded and installed an extension named News. Basically it's the same NewsHolder (ArticleHolder) and NewsPage (ArticlePage) to what is in the tutorials but without having to create the files yourself. It works great, you can view results here: http://www.ossipesonen.fi/www/ss_cms/uutiset/
But I have a problem. I can't get the "Tiedotteet" or Latest News to show on every page. It only shows on the News page. How can I change this? Latests News is like Latests Blogs but even in the tutorials it only works on HomePage. Do I need to change to a different CMS to get this working?Page.ss
<% include Menu2 %>
Menu2.ss
<% control Menu(2) %>
<% if Children %>
<li><p style="padding-top: 10px;"><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela">$MenuTitle.XML</a></p>
<% else %>
<li><p style="padding-top: 10px;"><a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela">$MenuTitle.XML</a></p>
<% end_if %>
</li>
<% end_control %> -
Re: Latest blogs\news\articles

31 January 2011 at 1:19pm
Latests News is like Latests Blogs but even in the tutorials it only works on HomePage.
This is because the PHP function is stored in the HomePage class (HomePage.php). No other page types "know" about functionality contained in other classes. If you want the same LatestNews() function available on all pages you should put the PHP function that is in HomePage.php (LatestNews()) in Page.php instead. All pages on your site should extend off Page so they will all inherit this functionality.
| 707 Views | ||
|
Page:
1
|
Go to Top |


