3
votes

I want to add several terms to an Orchard taxonomy, this taxonomy holds a large number of terms and if I added manually it would take me a life, so tried using the import, I know that it appends new terms but how to add a term under an existent parent term/s?

I tried something like this:

Parent term1;
    Children term1; taxonomy/test/parent-term1/children-term1

but i get:

The term Parent term1 already exists at this level

Is it possible to do? Thanks.

1
That's a good question, but I'm afraid that's a limitation. You should file a bug.Bertrand Le Roy
Alright, thanks Bertrand.krbnr

1 Answers

0
votes

My preferred method would be to do this through a recipe that creates the items. Here's a sample:

<Orchard>
<Data>
    <TaxNameTerm Id="/alias=parent-term" Status="Published">
      <TitlePart Title="Parent Term Title" />
      <CommonPart Container="/alias=taxname" />
      <TermPart Count="0" Selectable="true" Weight="9" TaxonomyId="/alias=taxname" Path="" />
    </TaxNameTerm>
    <TaxNameTerm Id="/alias=child-term" Status="Published">
      <TitlePart Title="Child Term Title" />
      <CommonPart Container="/alias=parent-term" />
      <TermPart Count="0" Selectable="true" Weight="9" TaxonomyId="/alias=taxname" Path="/alias=parent-term" />
    </TaxNameTerm>
</Data>
</Orchard>

This can be done after the parent term has been created as long as you've pointed the Path and Container at the parent.