Skip navigation

CQ5

Currently Being Moderated

How to set default tagging on template

Apr 24, 2012 7:21 AM

Tags: #tagging

Hi All,

I would like to know how can I set certain tags to the template so whenever a page is created the tag is prepoulated for that page?

 

Any pointers would be great.

 

Thanks

 
Replies
  • Currently Being Moderated
    Apr 24, 2012 8:57 AM   in reply to cqlearner

    Anything in the jcr:content node of the template seems to get apllied as initial content on page creation.  So adding a cq:tags string[] property to the /apps/myapp/templates/contentpage/jcr:content node with something like: marketing:interest/business will cause any page built with that template to start out with the Marketing Business tag.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 24, 2012 9:33 AM   in reply to cqlearner

    General tip: just create a page, configure the page properties, configure your components and/or add components to paragraph systems etc. as you'd like it for the template. Then copy the page's jcr:content node back to the template.

     

    Maybe you need to remove some of the metadata like jcr/cq:lastModified from the template to have it "clean", but that's the way to go, using the authoring interface.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points