Quantcast
Channel: Adobe Community : Popular Discussions - CQ5 (read only)
Viewing all articles
Browse latest Browse all 12476

question - can I script cq:Page creation via Sling?

$
0
0

Hello!

 

I was setting up my CQ5 dev environment and trying to figure out some ways to make things a little more convienent to develop for myself and team.

 

Taking as a starting poing: http://dev.day.com/docs/en/cq/current/developing/developmenttools/deve loping_with_eclipse.html, my approach was to, instead, try to script some of the interaction by calling sling services, rather than have to jump between various web interfaces.

 

I'd rather not call bin/wcmcommand, since from what i surmise from the app, so far, that was not a meant to be a service interface made for this purpose (since I can't locate any documentation on it). Please correct me if I am wrong.

 

But taking this approach, I am having an issue with getting a proper cq:Page by using Sling alone.

 

When I run this at the command line:

curl -D - -X POST -u admin:admin -d":operation=import" -d":contentType=jcr.xml" \

-d":nameHint=sample-app" -d":content@sample-app/design/.content.xml" \

-d":replace=true" http://localhost:4502/crx/repository/crx.default/etc/designs/sample-ap p

 

where my .content.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"

jcr:primaryType="cq:Page">

<jcr:content

cq:lastModified="{Date}2012-01-18T16:00:13.713-05:00"

cq:lastModifiedBy="admin"

cq:template="/libs/wcm/core/templates/designpage"

jcr:primaryType="cq:PageContent"

jcr:title="Sample Application Page Design 2"

sling:resourceType="wcm/core/components/designer"/>

</jcr:root>

 

the result it an nt:file node, not a cq:Page node.

 

I wonder if you could help me with this, and/or discuss whether this is a reasonable approach or not

 

Many thanks for considering this,

ken

 

Message was edited by: kshih@scripps


Viewing all articles
Browse latest Browse all 12476

Trending Articles