NESTED URLs
One of my reasons why I badly need to upgrade my old version was this. In 2.3, I just couldn't do this. Here's what SS Team had to say about this feature:
...the nested URLs feature means that your site URLs now reflect the actual parent/child page structure of your site. In SilverStripe 2.3 and earlier, all page URLs would be on the top level, regardless of whether they were nested under other pages or not. In 2.4 however, the URLs now map directly to the chain of parent and child pages
To enable this feature in your SS application, go to mysite folder, and open _config.php file. Add the following code.
// Enable Nested Urls in SS2.4
if (!SiteTree::nested_urls())
SiteTree::enable_nested_urls();
if (!SiteTree::nested_urls())
SiteTree::enable_nested_urls();
SITEWIDE SEARCH GONE?
Not really. In 2.4+, they switch this feature off by default. Perhaps they realized that not all applications built on SS use this feature.
For you to enable this functionality, here's what you need to do. Go to mysite folder and look for _config.php file. Open this up and type in the following:
// Enable Search in SS2.4+
FulltextSearchable::enable();
FulltextSearchable::enable();
TEMPLATE PATHS AND COMMENTS
In 2.4+, template paths are nowhere to be seen by default. Template Paths are those paths visible when you are running your application in Dev mode. If that's not enough, go to a page in your app, right-click your mouse and hit View-Source. You'll see long file paths along the markups.
Now here's the code you'll paste in mysite/_config.php file.
SSViewer::set_source_file_comments(true);
To see the changes, clear the cache like this:
http://your-domain/?flush=all
Tip: To add a comment into a template file, like if you want to document it, then use this (when your application is viewed in Published site, these comments won't be shown):
<%-- put your comments here --%>
That's it for now. As I've said, I'll update this article from time to time and as long as it's something valuable for us, I'll put them here. You could visit the blog every now and then or you could subscribe to my RSS feed for updates and new posts.
Thanks for reading. =]
Related Posts:
0 comments :
Post a Comment
Hi there! Please leave your message here. Also, I may not be able to respond to your query right away. So please bear with me. Thanks. :)