Form inputs for the portal:site content-type

Enonic version: 6.7.2
OS: Mac and linux

For page I can add a textline input for breadcrumbTitle like this:

<content-type>
    <display-name>Page</display-name>
    <super-type>base:structured</super-type>
    <allow-child-content>true</allow-child-content>
    <form>
        <input name="breadcrumbTitle" type="TextLine">
            <label>Breadcrumb title</label>
            <help-text>Leave empty to use displayName</help-text>
            <occurrences minimum="0" maximum="1"/>
        </input>
    </form>
</content-type>

But for site I cannot. It only has description. Which I guess comes from “internal” definition of portal types.
http://xp.readthedocs.io/en/stable/developer/site/content-types/portal-types.html?highlight=site

I can add it to the app site.xml, but that means fetching siteConfig instead of a normal query for the content.
Which means I must handle pages and site differently in my breadcrumbs code.

Thoughts?

Use x-data instead: http://xp.readthedocs.io/en/stable/developer/schema/mixins.html

Except I really don’t want the input on all content-types… only site.

Feature request for injecting x-data on specific content types?

1 Like

Not what I was thinking, but that is still a better workaround than using siteConfig.
It would have to work for content-type portal:site.

Just create a feature request and we’ll see what we can do!

That’s really your idea… and can’t we already add x-data fields to content type definitions via http://xp.readthedocs.io/en/stable/developer/schema/mixins.html?highlight=x-data#using-a-mixin

So what you are talking about is perhaps that multiple apps can add x-data fields to already existing content-types?
I guess SEO Meta Fields only applies to all content types, not just a selective few.