Hi Benjamin,

I think maybe it's not entirely clear from your previous post what you
want to be able to do, hence why you haven't had any replies. If it's
to do with accessing paragraph content on a code and aggregating that
further up the node tree then this Wiki entry will be a good place to
start:
http://www.magnolia.info/wiki/Wiki.jsp?page=SimpleNewsAggregatorTemplate

Hope that helps. If not then can you post some more info on what you want to do.

Simon

On 12/05/06, Benjamin Sempere <[email protected]> wrote:
Is there any documentation where I can find a sample code that does this?


-----Message d'origine-----
De: [email protected] [mailto:[EMAIL PROTECTED]
Envoyé: mercredi, 10. mai 2006 11:37
À: [email protected]
Objet: [magnolia-user] Add some content to repository by programmation

Hi,

I've a little question in glace with Magnolia (v2.5):
In fact, I would like to add some content in the repository...

*Here is my website structure:
  MyWebsite
     Department 1
     Department 2
     Department 2
     Department 4 (template: "twoColumns")

*I would like to add some content for the paragraph named
"rightColumnParagraph" of the "twoColumns" template used by the "Department
4" page.
For the moment, I am only able to connect myself on the repository and to
get a node (I do not know really if this last is the content node that I am
trying to find :-():
      Hashtable<String, String> env = new Hashtable<String, String>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
        env.put(Context.PROVIDER_URL, providerURL);
        InitialContext ctx = new InitialContext(env);

        RegistryHelper.registerRepository(ctx, "myRep", configFile,
repHomeDir, true);

        // Obtain the repository through a JNDI lookup
        Repository r = (Repository) ctx.lookup("myRep");

        // Create a new repository session, after authenticating
        Session session = r.login(new SimpleCredentials(login,
password.toCharArray()), null);

        Node rootNode = session.getRootNode();
        Node contentNode =
rootNode.getNode("clio/news/rightColumnParagraphs/MetaData/jcr:content");

Can someone help me in order to complete this step (getting the right node
and add some data like string to it)?
Thx in advance,

        Benjamin



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to