content management system - Silverstripe Template Issue -


I'm going to catch up with the Silverstripe framework and I've got a strange error.

For example, say I want to create a new 'membership' page. Within mysite / code, I have set up a membership.php page as follows:

  increases membership of the class page {} class membership_controller pagecontroller {} spreads   

Then I have a subscription in my template / layout folder with some test output. The CSS file is created. I then make a god and create a page in the CMS type 'membership'. At the front end, if I click on the new page form NAV bar membership, then I do not find the test text, it seems that the template is not being read?

Any thoughts?

Thank you.

Allen.

There are several common problems with templates:

  • Flushing work has changed many times in previous versions.
    I will not explain the details here, because they are likely to be subject to change soon.

  • Li> does not flush only the manifest and config (a template)

    (does not use the devail build templates, so there is no display flushing the template)
    Its This means that you dev / build

  • on a normal page not just Must be named exactly like CL's ass (I think its case Is responsive)
  • Check that the template file is not overwritten by another template file in the second place. (For example, if you have module name / template / fu.sss and theme / plain / templates / fu.sam theme template will be written on the module template
  • Make sure the template is not empty (This is an error in SilverStripe, at least in Version 3.1).
  • Activities on a controller can overwrite the template prefix. Here are some examples:

     < Code> // it will not use a template bill Okay, it will only use "some string" public function index () {return to "some string"]; / it will not use any template, it will output an empty string public function index (); // This " Bar.ss "will use a public function index () {$ $ -> $ return- (array '(time'))}}    < < Ol> 
  • set source_file_comments

    code> in your yml config:

     < Code> SSViewer: # display template file Use Rc_file_comments: true    
  • "" as a comment in the HTML output sou: Add "Showtomplate = 1" only while viewing your website

    When enabled, see the HTML source of the page (CTRL + u in Firefox) - a silver stepper will tell you which template is being used for the comment.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -