Exclude sections in Lyx

I need some versions of my text without some specific sections but I don't want to delete them, because I will need them again later. In a plain latex editor I would use %. Is there something in Lyx that allows me to temporarily exclude those text from the pdf creation?

-

I think branches can help you with this. I've never used them, so I'll just quote the LyX wiki:

Tricks with Branches

Branches are chunks of text that can be "activated" or "deactivated" -- turned on or off -- within document settings. Why would you want to do this? The official suggestion is to create problem sets: you might put the answers to problems in a branch that can be turned off when you print out problem sets for students, but turned on when you print out an answer key for yourself. How can this feature be used in the humanities? Below are some suggestions (followed by a sample file illustrating these tricks), but first instructions on creating branches.

To create a branch, go to Document→Settings→Branches. Type the name of a new branch into the "New" field, and click the Add button. (If you like, you can select a branch in the list of Available Branches and click on (De)activate to turn it on or off, or Alter color to change the background color for text in that branch as it appears in the LyX window.

Once a new branch is created, you can designate text as belonging to that branch by selecting that text and choosing Insert→Branch→[name of branch]. Alternatively, you can insert the branch first and then type your text.

Another option could be to add \usepackage{comment} to the preamble, add \begin{comment} in an ERT before the section, and \end{comment} in an ERT after the section.

-
Branches were exactly what I needed –  LostAvatar Sep 9 '13 at 7:59
There is also Insert > Note > Comment and Insert > Note > LyX Note. –  scottkosty Sep 10 '13 at 3:36