silverstripe

How to translate $url_handlers?

允我心安 提交于 2019-12-21 05:51:13
问题 I have a situation where I need to translate the following $url_handlers for different countries. So on an english site the URL looks like this: http://website.com/gyms/boston/group-training I need to be able to translate the "group-training" part of the URL. I have translated the rest of the site using the _t() method throughout. My current setup: class GymLocationPage_Controller extends Page_Controller { private static $allowed_actions = array( 'currentSpecials', 'sevenDayFreeTrial',

silverstripe dataobject searchable

[亡魂溺海] 提交于 2019-12-18 06:48:29
问题 I´m trying to have certain DataObjects (News) displayed in the default SearchResult Page. So the result should display normal Pages and News. Is there an easy way to accomplish that in Silverstripe 3? Or is it recommended to code it completely custom - I mean a custom controller/action which handles the search request and creates a result list, which I display then in a custom template? I found this, but obviously search is disabled right now: https://github.com/arambalakjian/DataObjects-as

How to apply a style to a single special HTML character across the page

本秂侑毒 提交于 2019-12-18 05:17:15
问题 We've got a client who want's to superscript to "registered trademark" (®) character across their website. The website is CMS based and not only are they having trouble consistently superscripting characters but the superscript styling doesn't carry across to any CMS generated page titles etc. I'm wondering what are the possible/ best ways to achieve this: Can CSS be used to apply a style to a specific special character? Using jQuery to apply the style post page load. Extending the template

Static Publishing and HTTPS

余生长醉 提交于 2019-12-14 03:55:10
问题 Following this question : Static Publishing in Silverstripe on Large Sites We've been implementing the module from this fork (https://github.com/Focus-Flow/silverstripe-staticpublishqueue/) and it's working great locally. We have done some modification to implement our own categories page, but nothing special. The only issue is now when we test on our server, which use https rather than http in local, nothing is working anymore. I've been trying to change a couple of thing in the

Static Publishing in Silverstripe on Large Sites

江枫思渺然 提交于 2019-12-14 02:15:36
问题 My company uses SilverStripe v3.1.21, along with the Subsite module to display and administer a number of clients' websites that sell products. This results in close to 200 subsites and a page count in the tens of thousands. The websites are very slow to load and tools such as Google's PageSpeed tell us page speeds are poor. We've already done step like combining and minimising the JS and compressing resources such as imaging, which gave some improvements, however the pages remain slow. The

synchronise Microsoft Access database with Silverstripe website database

穿精又带淫゛_ 提交于 2019-12-13 20:35:10
问题 My client has got an existing site with membership details, member portfolios and directories which are largely done manually in php associated with Silverstripe CMS platform which works well. Also their admin person has got an offline member data system - Microsoft Access, and they have been double adding membership details to MS Access according to the membership details on the website. My first thought was to ditch the MS Access and keep all database online, but they have been working on

Silverstripe 4: Member Login and Redirect to specific page

萝らか妹 提交于 2019-12-13 18:31:33
问题 I'd like to redirect Members who have successfully logged in to specific pages based on the group to which they belong. In the past I've been able to do this in SS3 with the following: CustomLoginForm.php: class CustomLoginForm extends MemberLoginForm { public function dologin($data) { // Redirect functionality here } } /mysite/_config.yml: Injector: MemberLoginForm: class: CustomLoginForm However, this approach does not work Silverstripe 4. I have tried: As above, creating a CustomLoginForm

White labeling silverstripe project

假装没事ソ 提交于 2019-12-13 17:14:47
问题 I m fairly new in Silverstripe. We've a project in silverstripe and we are asked to do white labelling. That means there will be different URLs that will be accessing same codebase with different design, logos, members, etc. For Example, We have three clients Client: ABC URL: http://www.abcclient.com/admin URL: http://www.abcclient.com/ Client: XYZ URL: http://www.xyzclient.com/admin URL: http://www.xyzclient.com/ Client: PQR URL: http://www.pqrclient.com/admin URL: http://www.pqrclient.com/

SilverStripe. How to redirect from www.domainName to domainName?

醉酒当歌 提交于 2019-12-13 17:11:02
问题 I'm looking to find the reverse of the method: Director::forceWWW(); My main domain should be domainName.com without www. 回答1: 3dgoo's solution is faster since it does not involve any php but I did... class PreventWWW extends DataExtension { public static function stopWWW() { if(!(strpos($_SERVER['HTTP_HOST'], 'www') !== 0)) { $destURL = str_replace(Director::protocol() .'www.', Director::protocol() , Director::absoluteURL($_SERVER['REQUEST_URI'])); header("Location: $destURL", true, 301);

Silverstripe 3: Can I set a custom error page in silverstripe for certain page types?

雨燕双飞 提交于 2019-12-13 14:17:39
问题 I'm wondering if it is possible to set a custom 404 page on silverstripe specific to a certain page type, while all other 404 errors use the default one. I have a particular page type "Events" which has event pages unpublished after their specific date. I also have a static page with links to some of the events. This page url is sent to members so they will still have access to the page even after some of the events may have passed. Once an event has passed, it is unpublished and therefore