You might have to change sling:resourceType property of that page.
Is there anyway that I can change the template from WCM, not in CRXDE?
You can use bulk editor under tools for that and change sling:resourceType property.
One more question.
Here is my web site structures.
home > pages
Let's say I have 100 pages under home using a template "A".
How can I change all these 100 page's template to "B" template at one time?
That's good. thanks for the answer.
However, I still need to change each property manaully.
It can be very tough if I have 1,000 pages to change.
1 person found this helpful
True .. In that case you have to use code to get all page with old resource type and change it to new one.
Something on top of my head
query = "<YOUR PATH>//element(*,cq:PageContent)[@slling:resourceType=OLDRESOURCETYPE];
Iterator<Resource> iter = resourceResolver.findResources(query,"xpath");
Resource curRes = iter.next();
Node n = curRes.adaptTo(Node.class);
n.setProperty("sling:resourceType",<Your new resource Type>)
Then dont forget to activate them (You can use activate tree code for this) ...
Thank you so much!