PHP Developers Network
http://forums.devnetwork.net/

bolt not navigating to testimonial record page
http://forums.devnetwork.net/viewtopic.php?f=1&t=142129
Page 1 of 1

Author:  gautamz07 [ Mon Jan 04, 2016 4:34 am ]
Post subject:  bolt not navigating to testimonial record page

In my contenttypes.yml file i have the following definition:

Syntax: [ Download ] [ Hide ]
#Testimonials
testimonials:
    name: Testimonials
    singular_name: Testimonial
    fields:
        name:
            type: text
            class: large
        position:
            type: text
        body:
            type: textarea
            height: 150px
    listing_template: testimonials.twig
    record_template: testimonial.twig
 


using the admin panel i have populated the testimonials database with 2-3 records , now i believe , when i navigate to

i should see the testimonial.twig in action ? I.E. the below file:

Syntax: [ Download ] [ Hide ]
{% include '_header.twig' %}

<main>
  <div class="container">
    <div class="page-header">
      <h1>Testimonial!</h1>
      <p>This is a testimonial.</p>
    </div>
    <div class="page-content">
      <p>Testimonial content...</p>
    </div>
  </div>
</main>

{% include '_footer.twig' %}


But instead i get an error thrown, That says the following:

No route found for "GET /Testimonial/1"

Author:  Celauran [ Mon Jan 04, 2016 7:36 am ]
Post subject:  Re: bolt not navigating to testimonial record page

What about /testimonial/1 ?

Author:  gautamz07 [ Mon Jan 04, 2016 8:21 am ]
Post subject:  Re: bolt not navigating to testimonial record page


Author:  Celauran [ Mon Jan 04, 2016 9:06 am ]
Post subject:  Re: bolt not navigating to testimonial record page

Do you have custom routes defined? Does adding slug/singular_slug to your contenttype help?

Author:  gautamz07 [ Mon Jan 04, 2016 10:26 am ]
Post subject:  Re: bolt not navigating to testimonial record page

I'll Try that Thanks .

Author:  gautamz07 [ Sat Jan 09, 2016 7:49 am ]
Post subject:  Re: bolt not navigating to testimonial record page


Author:  Celauran [ Mon Jan 11, 2016 8:00 am ]
Post subject:  Re: bolt not navigating to testimonial record page

No, it would just be http://localhost:8080/boltCMS/testimonial/1

Author:  gautamz07 [ Tue Jan 12, 2016 12:16 am ]
Post subject:  Re: bolt not navigating to testimonial record page

I tested with the default showcase contenttype (just made a listing.twig and record.twig) and using the following URL's

http://localhost:8080/boltCMS/showcases/1

http://localhost:8080/boltCMS/showcases

(ofcourse in the templates i am iterating over the record/records and echoing them. )

It worked !!

But with my custom contenttype my Url's don't work :( :(

Author:  Celauran [ Tue Jan 12, 2016 7:22 am ]
Post subject:  Re: bolt not navigating to testimonial record page

Can you post your contenttypes.yml and routing.yml? Also, what do you mean by it doesn't work? 404?

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/