Creating a custom field in Magnolia (new to Magnolia Java development)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I want to create a new custom field for magnolia, but I'm quite new to magnolia and have limited java knowledge ( about 1 year separate from magnolia ). In the magnolia docs custom field docs is here https://documentation.magnolia-cms.com/display/DOCS57/Custom+fields
However, I don't understand from this what new code I need to create or where I need to put it.
It says I need to implement it as a simple Vaadin Field in Magnolia. I tried googling this and found some links, but nothing useful for me. I need a full code example of making a custom field in magnolia. I also need to know where I should put the java code and how mangolia knows about my new code.
In magnolia docs, it says I need Definition class, factory class and field class. Are these in separate files? Where should they go in magnolia file structure?
UPDATE:
I think I know where to put the code inside custom magnolia module under fieldTypes folder.
magnolia
add a comment |
I want to create a new custom field for magnolia, but I'm quite new to magnolia and have limited java knowledge ( about 1 year separate from magnolia ). In the magnolia docs custom field docs is here https://documentation.magnolia-cms.com/display/DOCS57/Custom+fields
However, I don't understand from this what new code I need to create or where I need to put it.
It says I need to implement it as a simple Vaadin Field in Magnolia. I tried googling this and found some links, but nothing useful for me. I need a full code example of making a custom field in magnolia. I also need to know where I should put the java code and how mangolia knows about my new code.
In magnolia docs, it says I need Definition class, factory class and field class. Are these in separate files? Where should they go in magnolia file structure?
UPDATE:
I think I know where to put the code inside custom magnolia module under fieldTypes folder.
magnolia
add a comment |
I want to create a new custom field for magnolia, but I'm quite new to magnolia and have limited java knowledge ( about 1 year separate from magnolia ). In the magnolia docs custom field docs is here https://documentation.magnolia-cms.com/display/DOCS57/Custom+fields
However, I don't understand from this what new code I need to create or where I need to put it.
It says I need to implement it as a simple Vaadin Field in Magnolia. I tried googling this and found some links, but nothing useful for me. I need a full code example of making a custom field in magnolia. I also need to know where I should put the java code and how mangolia knows about my new code.
In magnolia docs, it says I need Definition class, factory class and field class. Are these in separate files? Where should they go in magnolia file structure?
UPDATE:
I think I know where to put the code inside custom magnolia module under fieldTypes folder.
magnolia
I want to create a new custom field for magnolia, but I'm quite new to magnolia and have limited java knowledge ( about 1 year separate from magnolia ). In the magnolia docs custom field docs is here https://documentation.magnolia-cms.com/display/DOCS57/Custom+fields
However, I don't understand from this what new code I need to create or where I need to put it.
It says I need to implement it as a simple Vaadin Field in Magnolia. I tried googling this and found some links, but nothing useful for me. I need a full code example of making a custom field in magnolia. I also need to know where I should put the java code and how mangolia knows about my new code.
In magnolia docs, it says I need Definition class, factory class and field class. Are these in separate files? Where should they go in magnolia file structure?
UPDATE:
I think I know where to put the code inside custom magnolia module under fieldTypes folder.
magnolia
magnolia
edited Nov 23 '18 at 12:07
weaveoftheride
asked Nov 23 '18 at 11:48
weaveoftherideweaveoftheride
1,31342342
1,31342342
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
However, I don't understand from this what new code I need to create or where I need to put it.
In general, documentation about development is what you should read before starting to do custom development.
In particular, you will need to create your own module and your own custom bundle to add this module into and combine with all modules you are already using. If you already have custom bundle all the easier.
Documentation also provides some suggestions on the tools you could be using, but pretty much any IDE and maven will do.
Once you have all this set up, you can start working on the custom field you desire. Code, classes you develop should be placed in your module and depending on what you exactly develop either registered via type mapping or as field type in Magnolia itself (e.g. via install task or via light module). Or in case of factories or presenters you can use them by simply referencing them from the app configuration that is supposed to used them. Such app can be again configured directly in Magnolia's JCR repository, programatically via your module, or probably most simply by adding app configuration to a light module.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446162%2fcreating-a-custom-field-in-magnolia-new-to-magnolia-java-development%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
However, I don't understand from this what new code I need to create or where I need to put it.
In general, documentation about development is what you should read before starting to do custom development.
In particular, you will need to create your own module and your own custom bundle to add this module into and combine with all modules you are already using. If you already have custom bundle all the easier.
Documentation also provides some suggestions on the tools you could be using, but pretty much any IDE and maven will do.
Once you have all this set up, you can start working on the custom field you desire. Code, classes you develop should be placed in your module and depending on what you exactly develop either registered via type mapping or as field type in Magnolia itself (e.g. via install task or via light module). Or in case of factories or presenters you can use them by simply referencing them from the app configuration that is supposed to used them. Such app can be again configured directly in Magnolia's JCR repository, programatically via your module, or probably most simply by adding app configuration to a light module.
add a comment |
However, I don't understand from this what new code I need to create or where I need to put it.
In general, documentation about development is what you should read before starting to do custom development.
In particular, you will need to create your own module and your own custom bundle to add this module into and combine with all modules you are already using. If you already have custom bundle all the easier.
Documentation also provides some suggestions on the tools you could be using, but pretty much any IDE and maven will do.
Once you have all this set up, you can start working on the custom field you desire. Code, classes you develop should be placed in your module and depending on what you exactly develop either registered via type mapping or as field type in Magnolia itself (e.g. via install task or via light module). Or in case of factories or presenters you can use them by simply referencing them from the app configuration that is supposed to used them. Such app can be again configured directly in Magnolia's JCR repository, programatically via your module, or probably most simply by adding app configuration to a light module.
add a comment |
However, I don't understand from this what new code I need to create or where I need to put it.
In general, documentation about development is what you should read before starting to do custom development.
In particular, you will need to create your own module and your own custom bundle to add this module into and combine with all modules you are already using. If you already have custom bundle all the easier.
Documentation also provides some suggestions on the tools you could be using, but pretty much any IDE and maven will do.
Once you have all this set up, you can start working on the custom field you desire. Code, classes you develop should be placed in your module and depending on what you exactly develop either registered via type mapping or as field type in Magnolia itself (e.g. via install task or via light module). Or in case of factories or presenters you can use them by simply referencing them from the app configuration that is supposed to used them. Such app can be again configured directly in Magnolia's JCR repository, programatically via your module, or probably most simply by adding app configuration to a light module.
However, I don't understand from this what new code I need to create or where I need to put it.
In general, documentation about development is what you should read before starting to do custom development.
In particular, you will need to create your own module and your own custom bundle to add this module into and combine with all modules you are already using. If you already have custom bundle all the easier.
Documentation also provides some suggestions on the tools you could be using, but pretty much any IDE and maven will do.
Once you have all this set up, you can start working on the custom field you desire. Code, classes you develop should be placed in your module and depending on what you exactly develop either registered via type mapping or as field type in Magnolia itself (e.g. via install task or via light module). Or in case of factories or presenters you can use them by simply referencing them from the app configuration that is supposed to used them. Such app can be again configured directly in Magnolia's JCR repository, programatically via your module, or probably most simply by adding app configuration to a light module.
answered Nov 24 '18 at 10:02
JanJan
3,171822
3,171822
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446162%2fcreating-a-custom-field-in-magnolia-new-to-magnolia-java-development%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown