Pragmatism, we are told, is the watchword for the United Nations' talks in Cancún where progress on issues such as how to stop the world's forests disappearing would allow hope to resurface that an overall deal on climate change is possible at some time in the future. But in Mexico the debate over how best to help efforts to deal with deforestation is much more than a stepping stone to something else. It is a major issue that affects huge swathes of a country and hundreds of communities, where experience has produced at least two major lessons for the rest of the world. A positive one and a negative one.

The positive one is that some 70% of Mexican forests are collectively owned by communities and where these communities have been given consistent support they have proved remarkably successful at harnessing their micro economies to the global need to lock carbon into plants and soils.

Take the Zapotec indigenous community of Ixtlan de Juarez just outside of the city of Oaxaca in the south east. Over three decades the community has developed its lumber business to the point where it now employs 300 people to care for the woodlands, harvest the timber and produce wooden furniture for sale. Migration from the area has fallen and education levels risen.

Or there is the more recent attempt by a cooperative of tappers in the chicozapote trees that grow in the jungles of the Yucatan, not all that far from Cancún, and produce the chicle sap that was the original raw material for chewing gum but has long since been replaced by petrochemicals. Now the tappers are helping to limit the encroachment of the agricultural frontier by finding new markets for a thoroughly modern new product – certified organic gum.

"Mexico is at the vanguard of a global trend towards community forestry management that isn't getting enough attention," says Deborah Barry of the US-based Rights and Resources Initiative which supports some of the Mexican NGOs working with communities.

"It's easier for governments to declare reserves but it doesn't work," says Barry. "If a community is making a living off a forest, they look after it much better than anybody else can or will."

Mexico also provides a rather less flattering lesson for the world than the government delegation at the Cancún talks is keen to publicise. It is just too embarrassing, and not just for the hosts, but for the UN as well.

When Felipe Calderon took office in December 2006 he promised to be the greenest ever Mexican president. And one of the ways he set out to prove his commitment was by planting trees. Lots of trees. He started with a pine, planted with his own bare hands alongside his young son and a speech announcing that there would be 250m more where that came from before the season was out. By the end of the year the government was claiming that it had not only met the target, but would be repeating the effort in 2008. It was a feat that led the United Nations Environment Programme to heap praise and prizes on Calderon.

The problem was that by that time the original presidential tree, tendered with reverential care throughout the year, was one of the few left standing. The vast majority were dying or already dead. After months ignoring exposés in the local media, the official auditor came out with a report in March 2009 that concluded only 10% of the trees had survived. Worse, the massive reforestation effort had taken funds away from supporting the community-based management schemes.

Though it never fully accepted the farce into which the massive reforestation programme had fallen, Calderon's government did appoint a new head of the national forestry commission who reassigned resources back to what works. Small communities looking after their own trees collectively. A vision of the future that harks back to old struggles, not least that of Emiliano Zapata in the Mexican revolution 100 years ago.

If they do indeed became a focus of international attention in Cancún over the next couple of weeks, their advocates say, these small communities could provide something truly worthwhile to the global effort over climate change. And pragmatism is always that much more appealing when there is a little idealism attached.