Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6123271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:59:46+00:00 2026-05-23T15:59:46+00:00

We have a requirement for a dexterity content type to have exclude from navigation

  • 0

We have a requirement for a dexterity content type to have exclude from navigation behaviour but for the exclude_from_nav field’s default value to be True. In the behaviour plone.app.dexterity.behaviors.exclfromnav.IExcludeFromNavigation it defaults to False.

Obviously I could create my own behaviour that copies IExcludeFromNavigation except for the default value but I was wondering if there was a way to do this based on reusing IExcludeFromNavigation. We have other content types that use IExcludeFromNavigation where we do want it to default to False.

We’re using Plone 4.1rc3 and Dexterity 1.0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:59:46+00:00Added an answer on May 23, 2026 at 3:59 pm

    I have this working using a plone.directives.form decorator.

    I’ve added this to one of my behaviour modules.

    from plone.directives.form import default_value
    
    @default_value(field = IExcludeFromNavigation['exclude_from_nav'])
    def excludeFromNavDefaultValue(data):
        return data.request.URL.endswith('++add++my_item_type')
    

    I also have the following in configure.zcml

    <include package="plone.directives.form" file="meta.zcml" />
    <include package="plone.directives.form" />
    
    <grok:grok package="." />
    

    Thanks to Martin for the large clue although his answer didn’t quite solve my problem. This feels like a bit of a hack to me – a more elegant solution would be nice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have requirement like, suppose I have a 'property' table which has 'ListingKey' field
In our project we have requirement that, after receiving sms message from third party
I am new in C# and have requirement to retrieve a url from C#.
We have a requirement to delete rows in the order of millions from multiple
I have a requirement to allow users in a content management system to create
I have different requirement from a customer to write a automated test script for
I have a requirement that my app, can receive events (e.g. messages) from server
I have a requirement to sort search results by relevance and another field. I
I have requirement to access the folder from a another machine based on the
I have a requirement where I have to fetch some records from the database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.