Re: [mezzanine-users] Need to have the same page in multiple locations in the page tree, how link them?
On Wed, Feb 14, 2018 at 9:24 AM, Roger van Schie wrote: > > I think I will just extend the Page model to include a foreign key, and > then add another check into the template tag to see whether the child page > currently being "inspected" has a foreign key or not, and if it does, just > to go one level deeper to get the info it needs. > I don't think you need to get that complicated. The `Page` model is aware of all of its `Displayable` children, whether `Link` or 'RichTextPage`. Your menu should iterate through all of them, going as deep or shallow as you like. Entirely possible we're both misunderstanding each other; I'll blame lack of both cognitive ability and caffeine on this end. -ken -- 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Need to have the same page in multiple locations in the page tree, how link them?
Hi Ken I might be missing your point, or misunderstanding something completely, but templating is not a problem for me, I've written the models/templates in such a way, that depending on what information they put into the page, various parts of the page template get displayed or not, and hence I'm able to reuse the same template for all levels (which is actually infinite, as far as mezzanine / django will allow). All I'm really doing is creating a fancy menu (besides the basic intro's etc ), displaying the children pages as graphical images, which I propagate into the template using template tags to pull the hero image's location instead of just their name. All this works perfectly fine. I think I will just extend the Page model to include a foreign key, and then add another check into the template tag to see whether the child page currently being "inspected" has a foreign key or not, and if it does, just to go one level deeper to get the info it needs. Still open to suggestions or corrections. Thanks Roger On 14 February 2018 at 15:25, Ken Bolton wrote: > Hi Roger, > > It is possible to do some terrifying things with the page templates. Read > http://mezzanine.jupo.org/docs/content-architecture.html#page-templates. > (Tortured language in that section is largely my fault, and improvements > are welcome.) I have managed to create "content inheritance trees" across > `Displayable`s by (ab)using the Mezzanine page templates. > > A note of caution: a lot of folks think their content and architecture is > unique, a special butterfly that doesn't fit long-established information > architecture patterns. I have yet to find a case where that is true, though > I acknowledge your client may have found it. Often, it only takes careful > management by engineering to help the customer past this. > > hth, > ken > > On Wed, Feb 14, 2018 at 3:47 AM, Roger van Schie > wrote: > >> Hi Everyone >> >> As far as I can tell, the "Link" page won't work for me because I pull >> information from the child page to display in the parent page. Basically, >> my client has different categories, and within those categories they have >> sub-categories, and so on, all built using the page tree structure. The >> sub-categories are displayed on the category page on a "card", with an >> image that is pulled from the sub-category page. I've basically created a >> custom menu, where the child pages' display more than just the title. >> >> Would an appropriate approach be to extend the link model to include a >> foreign key linking to the actual page? Or should I just extend the Page >> model with a foreign key to point to the other page? Anyone got a better >> suggestion / solution? >> >> Regards >> Roger >> >> On 8 February 2018 at 22:34, Danny wrote: >> >>> On 8/02/2018 9:18 PM, Roger van Schie wrote: >>> Hi Everyone I have a use case where the client basically wants a rich text field page to write about a certain product, but this product falls under different categories. Each category is higher up in the branch hierarchy, and they want that same page(the rich text field page) to be displayed in multiple categories. My current thinking is to just create a custom page model that has a foreign key to the other page and put that in the page tree. Would this be the best approach? >>> >>> An easier way to do it is to have the actual page at one place in the >>> hierarchy, and then use a 'Link' page elsewhere to automatically go to this >>> page. I've done this before, no troubles. >>> >>> It will mean that when viewing the page it will always just have the one >>> breadcrumb trail, but it will still be available from two places within the >>> navigation menus. >>> >>> Seeya. Dnany. >>> >>> >>> -- >>> 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 mezzanine-users+unsubscr...@googlegroups.com. >>> 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 mezzanine-users+unsubscr...@googlegroups.com. >> 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 mezzanine-users+unsubscr...@googlegroups.com. > 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://g
Re: [mezzanine-users] Need to have the same page in multiple locations in the page tree, how link them?
Hi Roger, It is possible to do some terrifying things with the page templates. Read http://mezzanine.jupo.org/docs/content-architecture.html#page-templates. (Tortured language in that section is largely my fault, and improvements are welcome.) I have managed to create "content inheritance trees" across `Displayable`s by (ab)using the Mezzanine page templates. A note of caution: a lot of folks think their content and architecture is unique, a special butterfly that doesn't fit long-established information architecture patterns. I have yet to find a case where that is true, though I acknowledge your client may have found it. Often, it only takes careful management by engineering to help the customer past this. hth, ken On Wed, Feb 14, 2018 at 3:47 AM, Roger van Schie wrote: > Hi Everyone > > As far as I can tell, the "Link" page won't work for me because I pull > information from the child page to display in the parent page. Basically, > my client has different categories, and within those categories they have > sub-categories, and so on, all built using the page tree structure. The > sub-categories are displayed on the category page on a "card", with an > image that is pulled from the sub-category page. I've basically created a > custom menu, where the child pages' display more than just the title. > > Would an appropriate approach be to extend the link model to include a > foreign key linking to the actual page? Or should I just extend the Page > model with a foreign key to point to the other page? Anyone got a better > suggestion / solution? > > Regards > Roger > > On 8 February 2018 at 22:34, Danny wrote: > >> On 8/02/2018 9:18 PM, Roger van Schie wrote: >> >>> Hi Everyone >>> >>> I have a use case where the client basically wants a rich text field >>> page to write about a certain product, but this product falls under >>> different categories. Each category is higher up in the branch hierarchy, >>> and they want that same page(the rich text field page) to be displayed in >>> multiple categories. >>> >>> My current thinking is to just create a custom page model that has a >>> foreign key to the other page and put that in the page tree. Would this be >>> the best approach? >>> >> >> An easier way to do it is to have the actual page at one place in the >> hierarchy, and then use a 'Link' page elsewhere to automatically go to this >> page. I've done this before, no troubles. >> >> It will mean that when viewing the page it will always just have the one >> breadcrumb trail, but it will still be available from two places within the >> navigation menus. >> >> Seeya. Dnany. >> >> >> -- >> 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 mezzanine-users+unsubscr...@googlegroups.com. >> 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 mezzanine-users+unsubscr...@googlegroups.com. > 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Need to have the same page in multiple locations in the page tree, how link them?
Hi Everyone As far as I can tell, the "Link" page won't work for me because I pull information from the child page to display in the parent page. Basically, my client has different categories, and within those categories they have sub-categories, and so on, all built using the page tree structure. The sub-categories are displayed on the category page on a "card", with an image that is pulled from the sub-category page. I've basically created a custom menu, where the child pages' display more than just the title. Would an appropriate approach be to extend the link model to include a foreign key linking to the actual page? Or should I just extend the Page model with a foreign key to point to the other page? Anyone got a better suggestion / solution? Regards Roger On 8 February 2018 at 22:34, Danny wrote: > On 8/02/2018 9:18 PM, Roger van Schie wrote: > >> Hi Everyone >> >> I have a use case where the client basically wants a rich text field page >> to write about a certain product, but this product falls under different >> categories. Each category is higher up in the branch hierarchy, and they >> want that same page(the rich text field page) to be displayed in multiple >> categories. >> >> My current thinking is to just create a custom page model that has a >> foreign key to the other page and put that in the page tree. Would this be >> the best approach? >> > > An easier way to do it is to have the actual page at one place in the > hierarchy, and then use a 'Link' page elsewhere to automatically go to this > page. I've done this before, no troubles. > > It will mean that when viewing the page it will always just have the one > breadcrumb trail, but it will still be available from two places within the > navigation menus. > > Seeya. Dnany. > > > -- > 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 mezzanine-users+unsubscr...@googlegroups.com. > 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Need to have the same page in multiple locations in the page tree, how link them?
On 8/02/2018 9:18 PM, Roger van Schie wrote: Hi Everyone I have a use case where the client basically wants a rich text field page to write about a certain product, but this product falls under different categories. Each category is higher up in the branch hierarchy, and they want that same page(the rich text field page) to be displayed in multiple categories. My current thinking is to just create a custom page model that has a foreign key to the other page and put that in the page tree. Would this be the best approach? An easier way to do it is to have the actual page at one place in the hierarchy, and then use a 'Link' page elsewhere to automatically go to this page. I've done this before, no troubles. It will mean that when viewing the page it will always just have the one breadcrumb trail, but it will still be available from two places within the navigation menus. Seeya. Dnany. -- 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Need to have the same page in multiple locations in the page tree, how link them?
Hi Roger. Would the Link model satisfy the requirements? On Feb 8, 2018 5:48 AM, "Roger van Schie" wrote: > Hi Everyone > > I have a use case where the client basically wants a rich text field page > to write about a certain product, but this product falls under different > categories. Each category is higher up in the branch hierarchy, and they > want that same page(the rich text field page) to be displayed in multiple > categories. > > My current thinking is to just create a custom page model that has a > foreign key to the other page and put that in the page tree. Would this be > the best approach? > > Regards > Roger > > -- > 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 mezzanine-users+unsubscr...@googlegroups.com. > 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 mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.