Ah, that worked. Thanks. I understand better now On Thursday, October 12, 2017 at 4:02:17 AM UTC-4, Joseph Mohan wrote: > > http://mezzanine.jupo.org/docs/content-architecture.html#page-templates > > You're missing the simplicity of this > > So let's say you want a page "Cakes" > > Go to Content/Pages and a create a new page (can be of any type, > Richtext/form etc) When you create the new page it will take the title you > entered and turn that into the Slug. > > So if your page was called "Cakes" the URL would now be > 127.0.0.1:8000/cakes and you would create the template to be customised > in /templates/pages/cakes.html > > In your case: "About Canvas" | 127.0.0.1:8000/about-canvas.html | > templates/pages/about-canvas.html > > If you want the page to have a different Title to the Slug, you can edit > the Meta section of a page. > > Joe > > > > On Thu, Oct 12, 2017 at 1:57 AM, Tom Tanner <[email protected] > <javascript:>> wrote: > >> Hm, I'm still doing something wrong. Here's what >> `PROJECT/myTheme/theme/templates/about/about-canvas.html` looks like now: >> >> >> {% extends "base.html" %} >> {% load mezzanine_tags i18n %} >> >> >> {% block meta_title %} >> {% if page %} >> {{ page.meta_title }} >> {% else %} >> {% trans "About" %} >> {% endif %} >> {% endblock %} >> >> >> TESTING HERE >> >> >> {% include "includes/contact_form.html" %} >> >> >> `PROJECT/myTheme/theme/templates/about/includes/contact_form.html still >> looks the same, though I did change the hyphens in the filenames to >> underscores, as you may notice. >> >> I copied the contact form HTML from one of the core Mezzanine templates, >> so I'm not totally sure what I'm doing. >> >> To give you a better idea of what I'm trying to do... If you open the >> Admin section of a new Mezzanine site, check out the "Pages" section. >> There's a "Contact" page. I'm trying to change that page into my "About" >> page. I'd like the page to include info about the site, along with the >> contact form that comes along with it by default. I thought copying the >> template at `mezzanine/forms/templates/pages/form.html` would help with >> this. >> >> On Wednesday, October 11, 2017 at 3:35:40 AM UTC-4, Joseph Mohan wrote: >>> >>> Your url has to match the filename (or vise-versa) >>> >>> So in Content/Pages/About In the Meta section, the Url should be >>> /about-canvas >>> (http://127.0.0.1:8000/about-canvas) >>> >>> *or* >>> >>> Rename about-canvas.html to about.html >>> >>> Also, always make sure to restart the development server when adding new >>> files. >>> >>> Hope that helps >>> >>> On Tue, Oct 10, 2017 at 10:39 PM, Tom Tanner <[email protected]> >>> wrote: >>> >>>> Hello, >>>> >>>> I've started learning Mezzanine over the past few weeks. I'm making my >>>> own theme. I want to make an `about/` page containing the default "contact >>>> us" form Mezzanine comes with. Here's what part of my project looks like >>>> in >>>> directory. `PROJECT/myTheme/theme/templates/about`. >>>> >>>> In the `about/` folder, I have `about-canvas.html` and >>>> `includes/contact-form.html`. >>>> >>>> `about-canvas.html` looks like this. >>>> >>>> {% extends "base.html" %} >>>> >>>> >>>> {% load mezzanine_tags i18n %} >>>> >>>> >>>> TESTING HERE >>>> >>>> >>>> {% include "includes/contact-form.html" %} >>>> >>>> `includes/contact-form.html` looks like this >>>> >>>> {% load mezzanine_tags i18n %} >>>> >>>> >>>> {% block extra_head %} >>>> {{ block.super }} >>>> {{ form.media }} >>>> {% endblock %} >>>> >>>> >>>> {% block main %} >>>> {{ block.super }} >>>> {% if request.GET.sent %} >>>> {% editable page.form.response %} >>>> {{ page.form.response|richtext_filters|safe }} >>>> {% endeditable %} >>>> {% else %} >>>> {% with page.form as page_form %} >>>> {% editable page_form.content %} >>>> {{ page_form.content|richtext_filters|safe }} >>>> {% endeditable %} >>>> {% endwith %} >>>> >>>> >>>> {% errors_for form %} >>>> <div class="container"> >>>> <form class="mezzanine-form" method="post"{% if form.is_multipart %} >>>> enctype="multipart/form-data"{% endif %}> >>>> {% fields_for form %} >>>> <div class="form-actions"> >>>> <input class="btn btn-primary btn-lg" type="submit" >>>> value="{% if page.form.button_text %}{{ page.form.button_text }}{% >>>> else %}{% trans "Submit" %}{% endif %}"> >>>> </div> >>>> </form> >>>> </div> >>>> >>>> >>>> {% endif %} >>>> >>>> >>>> {% endblock %} >>>> >>>> >>>> >>>> >>>> {% block extra_js %} >>>> {{ block.super }} >>>> <script> >>>> $(function() {$('.mezzanine-form >>>> :input:visible:enabled:first').focus();}); >>>> </script> >>>> {% endblock %} >>>> >>>> >>>> Yet when I fire up `python manage.py runserver`, and head to " >>>> http://127.0.0.1:8000/about/", it does not appear anything changed. I >>>> don't see the phrase "TESTING HERE" on the page to indicate that Mezzanine >>>> reads from my custom template. >>>> >>>> What must I change so that Mezzanine will read `about-canvas.html` when >>>> I go to "http://127.0.0.1:8000/about/"? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Mezzanine Users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Mezzanine Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > >
-- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
