Ah okay, yeah was going to go this route if there wasn't someway to do it
in settings.
Thank you for your help.
On Monday, January 6, 2014 4:03:06 PM UTC-5, Stephen McDonald wrote:
>
> The templates IDs are stored as a comma separated string in the "in_menus"
> field, so something like this I guess, where we account for pages that
> don't have any templates selected and therefore don't need an extra comma
> when appending the new template ID:
>
>
> from mezzanine.core.models import Page
> from django.db.models import F
>
> template_id = "42"
>
> Page.objects.exclude(in_menus="").update(in_menus=F("in_menus") + ","
> + template_id)
> Page.objects.filter(in_menus="").update(in_menus=template_id)
>
>
> Above code is untested and comes without warranty.
>
>
>
> On Tue, Jan 7, 2014 at 7:57 AM, Jackson Hong <[email protected]<javascript:>
> > wrote:
>
>> Right, sorry I should be more clear. Yes they are checked when adding a
>> new page. But say I create a new item in page_menu_templates but I want all
>> the old pages to be checked for this item. Is there anyway to do this?
>>
>>
>> On Monday, January 6, 2014 3:50:56 PM UTC-5, Stephen McDonald wrote:
>>
>>> Are you adding a page or editing a new one?
>>>
>>> Of course it won't affect editing existing pages, those already have
>>> their templates selected.
>>>
>>> It works fine for me, quadruple check you've set it correctly.
>>>
>>>
>>>
>>> On Tue, Jan 7, 2014 at 7:43 AM, Jackson Hong <[email protected]>wrote:
>>>
>>>> PAGE_MENU_TEMPLATES = (
>>>> (1, "Top navigation bar", "pages/menus/top_nav_tabs.html"),
>>>> (2, "Left-hand tree", "pages/menus/sidebar_nav.html"),
>>>> (3, "Footer", "pages/menus/footer.html"),
>>>> (4, "Homepage", "index.html"),
>>>> (5, "Search", "search_results.html"),
>>>> (6, "Overview", "pages/menus/overview_page.html"),
>>>> )
>>>>
>>>> PAGE_MENU_TEMPLATES_DEFAULT = [5, 6]
>>>>
>>>> I have this in my settings file. The checkboxes still remain unchecked
>>>> by default.
>>>>
>>>> What am I missing here?
>>>>
>>>>
>>>> On Monday, January 6, 2014 3:23:58 PM UTC-5, Stephen McDonald wrote:
>>>>
>>>>> See the PAGE_MENU_TEMPLATES_DEFAULT setting
>>>>>
>>>>> http://mezzanine.jupo.org/docs/configuration.html#page-menu-
>>>>> templates-default
>>>>>
>>>>>
>>>>> On Tue, Jan 7, 2014 at 7:21 AM, Jackson Hong <[email protected]>wrote:
>>>>>
>>>>>> Hi everyone,
>>>>>>
>>>>>> I was wondering how to make a new checkbox default to true when
>>>>>> adding in a new item in page_menu_templates.
>>>>>>
>>>>>> Currently it defaults to unchecked.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> --
>>>>>> 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/groups/opt_out.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Stephen McDonald
>>>>> http://jupo.org
>>>>>
>>>> --
>>>> 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/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> --
>>> Stephen McDonald
>>> http://jupo.org
>>>
>> --
>> 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/groups/opt_out.
>>
>
>
>
> --
> Stephen McDonald
> http://jupo.org
>
--
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/groups/opt_out.