Ah' - I just pulled up the library, I see what you're saying now. When I did my site I didn't want the index page editable so I just overrode the main index.html page and used base.html instead of pages/page.html Looks like the extension hierarchy goes base.html -> page.html -> ricktextpage.html -> index.html
Well at least I know how to do it if I ever want to edit it via the admin page! Thanks lol On Thu, May 22, 2014 at 1:45 PM, Josh Cartmell <[email protected]> wrote: > Well, if you are making the homepage an editable page in the page tree you > have to modify your projects urls.py and it will specifically look for > pages/index.html for the home page. I usually make pages/homepage.html (to > match the name of the model) and then have pages/index.html only contain: > > {% extends "pages/homepage.html" %} > > That way pages/index.html gets the styling from pages/homepage.html and > any other instance of a HomePage page will pick up styling from > pages/homepage.html making it consistent. > > pages/homepage.html would be something like: > > {% extend "pages/page.html" %} > > {% block main %} > > {{ content goes here }} > > {% endblock %} > > > > On Thu, May 22, 2014 at 3:29 PM, Josh Johnson <[email protected]> wrote: > >> Ah'! >> >> Thanks Josh, probably better for him to extend base.html in that case no? >> Index.html simply extends it and inserts content into its 'body' block. >> >> >> On Thu, May 22, 2014 at 12:16 PM, Josh Cartmell <[email protected]>wrote: >> >>> Hey Josh, I think his reasoning was to make the homepage a backend >>> editable page in which case there could be more than one of them. The ones >>> that don't have a slug of / would look for pages/homepage.html. By >>> extending index.html (and more likely pages/index.html) you can make them >>> all look the same without having duplicate templates >>> >>> >>> On Thu, May 22, 2014 at 2:07 PM, JoshJ <[email protected]> wrote: >>> >>>> Hi Wesley, >>>> >>>> What would be the reason behind keeping Mezzanines index.html and >>>> having your own homepage.html extend it? >>>> >>>> What I mean is, if you copy the index.html from the Mezzanine library >>>> and place it in your local templates folder you can override Mezzanines >>>> index.html and customize it however you like. So that whenever Mezzanine >>>> looks for index.html it will pull up your index.html template. Their index >>>> is more of a starting point and not a solution so feel free to cut it up >>>> however you'd like :) >>>> >>>> As an example I've set the templates folder for my project to be (via >>>> settings.py) to be the 'templates' folder from the root of my project. >>>> Ex: TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),) >>>> >>>> So if I place index.html in that folder Mezzanine loads that file as my >>>> index. I can put whatever I want in the file and mezzanine will use it as >>>> the index. >>>> >>>> >>>> On Tuesday, May 13, 2014 12:09:46 AM UTC-7, Wesley wrote: >>>>> >>>>> Hi all, >>>>> I am learning to customize homepage theme according to >>>>> http://bitofpixels.com/blog/mezzatheming-part-2-the-homepage/ >>>>> Here I hit a question that, homepage always use pages/index.html, >>>>> actually, I have a homepage.html extends pages/index.html. >>>>> >>>>> So, how to change the template name for the new added >>>>> homepage(subclass Page just as that artical said). >>>>> >>>>> Thanks. >>>>> Wesley >>>>> >>>> -- >>>> 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 a topic in the >>> Google Groups "Mezzanine Users" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/mezzanine-users/Cekm4a0K7o8/unsubscribe >>> . >>> To unsubscribe from this group and all its topics, 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]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Mezzanine Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/mezzanine-users/Cekm4a0K7o8/unsubscribe. > To unsubscribe from this group and all its topics, 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]. For more options, visit https://groups.google.com/d/optout.
