how one practices Mindfulness of Dhamma. 
Answer 2:  Today we will consider Mindfulness of the Dhamma-in-the-Dhamma in order to penetrate through to seeing clearly the cause of the arising of the Five Aggregates, that is, to understand the reason for the rebirth of the psycho -physical organism (N±mar³pa). This insight is sufficient for attaining the path and fruit of Nirv±ºa and penetrating the Four Noble Truths. 
The word Dhamma has many meanings – Nature, Truth, Lord Buddha’s teachings, and, more broadly, “mental objects.” In the Four Foundations of Mindfulness context, it has always been translated as “mental objects.” This is not wrong, but it is a bit vague. When we look, closely at what Lord Buddha would have us contemplate, we find a specific list of five items: [1] First, the five Hindrances or N²varaºa, [2] Second, the five Aggregates or Khanda, [3] Third, the six Sense Organs and six Sense Objects or ¾yatana, [4] Fourth, the seven Factors of Enlightenment or Bojjhaªga, and [5] Fifth, the Four Noble Truths (Ariyasacca). It is clear that Dhamma, here, means contemplation of “Teachings” rather than all mental phenomena. This focuses our task and makes it do-able. In English, this is reflected by capitalizing the word Dhamma.
Penetrating to lucid comprehension of the Dhamma – the True Nature of Reality as perceived by Lord Buddha during enlightenment - has been our real ultimate goal all along. Climbing the ladder of refined bodies was really just a technique for raising our level of consciousness, step-by-step, to develop the ability to comprehend and internalize these lessons. Developing Dhammak±ya is the fulfillment of achieving this capability. The meditator raises consciousness through consecutive Noble Disciple stages to Dhammak±ya Arahant level, competent to experience Nibb±na directly, during meditation to compare compound and non-compound nature with true, relevant, valid, and reliable data. Thus, we are finally down to our ultimate task of penetrating Lord Buddha’s Dhamma, which is also our own internal Dhamma, culminating in the Four Noble Truths. These are the final steps to enlightenment. 
Let us summarize, briefly, the essence of each of the five meditations detailed in the Mah± Satipaµµh±na Sutta. Regarding the Five Hindrances, one must be aware of the Five Hindrances and prevent and remove them through Samadha meditation to attain Jh±na. First, Applied Thought (Vitakka) overcomes sleepiness and laziness (Th²na-middha); Second, Sustained Thought (Vic±ra) overcomes doubt (Vicikicch±); Third, joy (P²ti) overcomes ill will (By±p±da); Fourth, contented happiness (Sukha) overcomes restlessness (Uddhacca-kukkucca); and, Fifth, concentration (Ekaggat±) overcomes sensual enchantment (K±machanda).
Regarding the Five Aggregates or Khanda which make up our psycho-physical organism (N±ma-r³pa), they are Body (R³pa), Feelings or Sensations (Vedan±), Memory (Saññ±), Thought (Saªkh±ra) and Cognition (Viññ±ºa). The meditator must be aware of attachment to these Khanda and carefully analyze them to see them as they really are – ephemeral, frustrating, and illusory. 
Similarly, with respect to the six Sense Bases (the eye, ear, nose, tongue, body, and mind) and their Sense Objects (sights, sounds, smells, tastes, tangible objects and mental objects), meditators must examine them in detail to understand their true nature as Impermanent, Subject to Change, and Non-self. This helps to develop Right Wisdom with respect to the Three Universal Characteristics (Tilakkhaºa) of all Compound Things. 
Next, the meditator contemplates the seven bhojjaªga as just the seven factors of enlightenment to be developed, not mine, not I, not self, but just as phenomena. When the enlightenment factor of mindfulness (Sati-sambojjhaªga) is present, he knows it is present. When it is not present, he knows it is not present. He also knows how it arises and how complete development of it comes to be. He is similarly aware regarding the enlightenment factors of investigation of phenomena (Dhamma-vicaya-bojjhaªga),  effort (Viriya-sambojjhaªga),  rapture (Piti-sambojjhaªga), tranquility (Passaddhi-sambojjhaªga), concentration (Sam±dhi-sambojjhaªga), and the enlightenment factor of equanimity (Upekkh±-sambojjhaªga). Thus, he dwells perceiving again and again dhammas as just dhammas (not mine, not I, not self, but just as phenomena) in himself. Being detached from craving and wrong views, he dwells without clinging to anything in the world. 
Finally, the meditator contemplates the Four Noble Truths in similar fashion, to see them as they really are and to develop the right wisdom to understand what should be done. First, regarding the Truth of Suffering (Dukkha), he contemplates birth, aging, death, sorrow, lamentation, physical pain, mental pain, anguish, being associated with persons and things that one dislikes, being separated from persons and things that one likes, wishing for what one cannot get, aging, sickness, and death. And, at last, he contemplates the Five Aggregates of Clinging as Dukkha. 
Second, regarding the Cause of Dukkha, Samudaya, he ponders over craving, rebirth, delight, clinging, sense pleasures, craving for a better existence and craving for non-existence. He contemplates that craving and clinging arise where there is pleasurable feelings. This means at the six sense bases. When sense-contact yields pleasurable feeling, craving arises and leads to volitional intention. 
Third, regarding Nirodha, Nirodha is the cessation of the causes of Dukkha and Dukkha itself, the complete extinction of craving, abandoning and discarding it. One achieves liberation and detachment from it. Craving is abandoned wherever delight and pleasure are found. That is, craving is abandoned in the six sense bases. When craving is discarded, volition is also abandoned, applied thought is deserted, and sustained thought is also cast off. This is the cessation of Dukkha.
Fourth, the meditator contemplates the Noble Eightfold Path (Magga): Right View, (Samm±diµµhi), Right Thought (Samm±saªkappa), Right Speech (Samm±-v±c±), Right Action (Samm±kammanta), Right Livelihood (Samm±±j²va), Right Effort (Samm±v±y±ma), Right Mindfulness (Samm±sati), and Right Concentration (Samm±-sam±dhi). With Right Concentration, and detached from sensual desire and unwholesome states, he attains and dwells in the first Jh±na; then the second Jh±na; the third Jh±na; and the fourth Jh±na. This is a state of pure mindfulness born of equanimity. It is Right Concentration. And, that is the Noble Truth of the Path leading to the cessation of Dukkha.
The meditator contemplates these Four Noble Truths in three transcendent mental states (ѱºa): (1) In Sacca ѱºa he penetrates to lucid direct knowledge of suffering, the cause of suffering, Nibb±na, and the Path to Nibb±na. (2) In Kicca ѱºa he achieves the Right Wisdom to know what to do regarding each of the Four Noble Truths. He must divest himself of Dukkha, give up craving, realize Nibb±na, and keep to the Path. (3) Finally, in Kata ѱºa, the meditator recognizes that he has already achieved these tasks. This is Gotrabh³ ѱºa, the first of the transcendental Dhammak±ya states. From there, when the meditator can cut at least the first three of the ten Fetters, which are false self concept, doubt and reliance on ineffective rituals, he can immediately experience the non-compound nature of Nibb±na. 
Lord Buddha said, “Whoever practices these four Satipaµµh±na for seven years can expect either immediate Arahantship or the state of Non-returner (An±g±m²). ... Forget seven years, whoever practices these four Satipaµµh±na for seven months, can expect either Arahantship or Non-Returner status. ... Forget seven months, whoever practices these four Satipaµµh±na ...for only seven days can expect one of two results: Arahantship in this very existence or the state of Non-Returner (An±g±m²). Thus, the four Satipaµµh±na are the one-way highway to the purification of the minds of beings, for overcoming sorrow and lamentation, for the cessation of physical and mental pain, for the attainment of the Noble Path, and for the realization of Nibb±na. 

Mindfulness of Dhamma Meditation

One practices Mindfulness of the Dhamma-in-the-Dhamma in order to penetrate through to seeing clearly the cause of the arising of the Five Aggregates, that is, to understand the reason for the rebirth of the psycho-physical organism (Namarupa). This insight is sufficient for attaining the path and fruit of Nirvana and penetrating the Four Noble Truths. 

The word Dhamma has many meanings – Nature, Truth, Lord Buddha’s teachings, and, more broadly, “mental objects.” In the Four Foundations of Mindfulness context, it has always been translated as “mental objects.” This is not wrong, but it is a bit vague. When we look, closely at what Lord Buddha would have us contemplate, we find a specific list of five items: (1) First, the five Hindrances, (2) Second, the five Aggregates, (3) Third, the six Sense Organs and six Sense Objects, (4) Fourth, the seven Factors of Enlightenment, and (5) Fifth, the Four Noble Truths. It is clear that Dhamma, here, means contemplation of “Teachings” rather than all mental phenomena. This focuses our task and makes it do-able. In English, this is reflected by capitalizing the word Dhamma.

Penetrating to lucid comprehension of the Dhamma – the True Nature of Reality as perceived by Lord Buddha during enlightenment - has been our real ultimate goal all along. Climbing the ladder of refined bodies was really just a technique for raising our level of consciousness, step-by-step, to develop the ability to comprehend and internalize these lessons. Developing Dhammakaya is the fulfillment of achieving this capability. The meditator raises consciousness through consecutive Noble Disciple stages to Dhammakaya Arahant level, competent to experience Nirvana directly, during meditation to compare compound and non-compound nature with true, relevant, valid, and reliable data. Thus, we are finally down to our ultimate task of penetrating Lord Buddha’s Dhamma, which is also our own internal Dhamma, culminating in the Four Noble Truths. These are the final steps to enlightenment. 

Five Hindrances

Let us summarize, briefly, the essence of each of the five meditations detailed in the Mahasatipatthana Sutta. Regarding the Five Hindrances, one must be aware of the Five Hindrances and prevent and remove them through Concentration Meditation to attain Jhana. First, Applied Thought (Vitakka) overcomes sleepiness and laziness (Thina-middha); Second, Sustained Thought (Vicara) overcomes doubt (Vicikiccha); Third, joy (Piti) overcomes ill will (Byapada); Fourth, contented happiness (Sukha) overcomes restlessness (Uddhacca-kukkucca); and, Fifth, concentration (Ekaggata) overcomes sensual enchantment (Kamachanda).

Five Aggregates

Regarding the Five Aggregates which make up our psycho-physical organism (Nama-rupa), they are Body (Rupa), Feelings or Sensations (Vedana), Memory (Sañña), Thought (Sankhara) and Cognition (Viññana). The meditator must be aware of attachment to these Khanda and carefully analyze them to see them as they really are – ephemeral, frustrating, and illusory. 

The Six Sense Organs & Six Sense Objects

Similarly, with respect to the six Sense Bases (the eye, ear, nose, tongue, body, and mind) and their Sense Objects (sights, sounds, smells, tastes, tangible objects and mental objects), meditators must examine them in detail to understand their true nature as Impermanent, Subject to Change, and Non-self. This helps to develop Right Wisdom with respect to the Three Universal Characteristics of all Compound Things. 

The Seven Factors of Enlightenment

Next, the meditator contemplates the seven bhojjanga as just the seven factors of enlightenment to be developed, not mine, not I, not self, but just as phenomena. When the enlightenment factor of mindfulness (Sati-sambojjhanga) is present, he knows it is present. When it is not present, he knows it is not present. He also knows how it arises and how complete development of it comes to be. He is similarly aware regarding the enlightenment factors of investigation of phenomena (Dhamma-vicaya-bojjhanga),  effort (Viriya-sambojjhanga), rapture (Piti-sambojjhanga), tranquility (Passaddhi-sambojjhanga), concentration (Samadhi-sambojjhanga), and the enlightenment factor of equanimity (Upekkha-sambojjhanga). Thus, he dwells perceiving again and again dhammas as just dhammas (not mine, not I, not self, but just as phenomena) in himself. Being detached from craving and wrong views, he dwells without clinging to anything in the world. 

The Four Noble Truths

Finally, the meditator contemplates the Four Noble Truths in similar fashion, to see them as they really are and to develop the right wisdom to understand what should be done.

First, regarding the Truth of Suffering (Dukkha), he contemplates birth, aging, death, sorrow, lamentation, physical pain, mental pain, anguish, being associated with persons and things that one dislikes, being separated from persons and things that one likes, wishing for what one cannot get, aging, sickness, and death. And, at last, he contemplates the Five Aggregates of Clinging as Suffering. 

Second, regarding the Cause of Suffering, Samudaya, he ponders over craving, rebirth, delight, clinging, sense pleasures, craving for a better existence and craving for non-existence. He contemplates that craving and clinging arise where there is pleasurable feelings. This means at the six sense bases. When sense-contact yields pleasurable feeling, craving arises and leads to volitional intention. 

Third, regarding Nirodha, Nirodha is the cessation of the causes of suffering and suffering itself, the complete extinction of craving, abandoning and discarding it. One achieves liberation and detachment from it. Craving is abandoned wherever delight and pleasure are found. That is, craving is abandoned in the six sense bases. When craving is discarded, volition is also abandoned, applied thought is deserted, and sustained thought is also cast off. This is the cessation of suffering.

Fourth, the meditator contemplates the Noble Eightfold Path (Magga): Right View, (Samma-ditthi), Right Thought (Samma-samkappa), Right Speech (Samma-vaca), Right Action (Samma-kammanta), Right Livelihood (Samma-ajiva), Right Effort (Samma-vayama), Right Mindfulness (Samma-sati), and Right Concentration (Samma-samahi). With Right Concentration, and detached from sensual desire and unwholesome states, he attains and dwells in the first Jhana; then the second Jhana; the third Jhana; and the fourth Jhana. This is a state of pure mindfulness born of equanimity. It is Right Concentration. And, that is the Noble Truth of the Path leading to the cessation of seffering.

The meditator contemplates these Four Noble Truths in three transcendent mental states (Ñana): (1) In Sacca-ñana he penetrates to lucid direct knowledge of suffering, the cause of suffering, Nirvana, and the Path to Nirvana. (2) In Kicca-ñana he achieves the Right Wisdom to know what to do regarding each of the Four Noble Truths. He must divest himself of suffering, give up craving, realize Nirvana, and keep to the Path. (3) Finally, in Kata-ñana, the meditator recognizes that he has already achieved these tasks. This is Gotrabhu-ñana, the first of the transcendental Dhammakaya states. From there, when the meditator can cut at least the first three of the ten Fetters, which are false self concept, doubt and reliance on ineffective rituals, he can immediately experience the non-compound nature of Nirvana.