Open Browser, Insert Template

Like most database-driven systems, the content management system I use for my web sites, Conversant, is a template-based system. This means that any time someone brings up a page in this site, there’s a pre-defined template, and Conversant sort of fills in the blanks based on the type of page being requested and a variety of other factors.

From my experience, templates are both a boon and a real pain-in-the-butt. On the one hand, you can do a lot of powerful things, especially when templates are combined with the sort of conditional macros that Conversant has. Depending on a number of different conditions, for example, there are several different possible version of pages that people might see. Members of this site see a slightly different version than non-members. Most pages have a printer friendly version, and there are different versions served up to search engines and other robots.

Anyway, in May 2001, Macrobyte added an InsertTemplate macro, and at the time I really did not pay much attention because I had no idea what I would use it for. As my sites have become a lot more complex and began adding features over the past several months, however, it has become a life saver.

To put it simply, the InsertTemplate macro lets me break down the template itself into a bunch of logical sub-templates.

For example, rather than have HTML markup for the header part of each page, I have a separate template called (oddly enough) “Header.” In the default template for this site is a macro that says InsertTemplate name=”Header”. Now the “Header” might seem like a simple matter, but in my case the header area is actually pretty complex with all sorts of options, especially related to Javascript, that have to be checked. It is a lot easier for me to deal with this sort of thing when it is separated into smaller chunks.

In effect what it allows me to do is separate content areas of the template, such as the header information or how page content will be presented, away from the basic shell of tables and rows in which the information is contained.

Now I would not even think of doing this if it didn’t meet my basic criteria — it is extremely fast. In fact, in some cases I have three levels deep worth of templates, and it processes all of this extremely fast.

More importantly, templates can be used across subsites. For example, there are four web sites under this domain. There is carnell.com, brian.carnell.com, emma.carnell.com, and elisabeth.carnell.com, which are all distinct and separate sites. But I can define a template in my site and then insert it in each of the other sites. So, for example, if I wanted to I could make the default template for any of the other sites be a single line InsertTemplate Name=”default” conversation=”brian”.

Very nice and very powerful.

Please Excuse Poland’s Farmers for Not Celebrating European Union Milestone

Today marks a milestone for the European Union — the euro became a legal currency in 12 countries across Europe comprising 300 million people. Sometime in February, those 12 countries will phase out their existing currency and the euro will be the sole currency. Do not expect to see farmers in Poland, which is not yet a European Union country, celebrating the EU’s advance, however — if the multi-state confederation has its way, millions of small farmers in Poland will be out of work.

The European Union maintains that Poland’s small landholdings are inefficient. According to a Christian Science Monitor report, of 2 million farms in Poland, 1.6 million are small family farms of only a small number of acres (in southern Poland, the average farm is just 10 acres). If Poland wants to join the European union, it would have to pass laws preventing these small farmers from selling their produce.

Now, countries with poorly functioning property laws that result in many extremely small farms may be inefficient, but the hilarious part of this is that the European Union wants to get rid of the small farms so that it can push heavily subsidized goods from farms in existing EU countries. Will Poland be able to offer its farmers subsidies as well? No — farmers in the new member states such as Poland would not be eligible for such subsidies.

This is not about preventing inefficient farming practices in Poland, but rather protecting the inefficient and heavily subsidized farming practices in existing EU nations. If the EU really wants to promote efficient agriculture, it could start at home by drastically slashing its farming subsidies rather than trying to rig Polish agriculture in its favor.

Don’t hold your breath waiting for that to happen.

Source:

Poland’s small farms stunt EU aspirations. Arie Farnam, The Christian Science Monitor.

South Korea May Legalize Sale of Dog Meat

As this site reported back in November (see FIFA Takes on Dog Meat), animal rights activists are using South Korea’s hosting of the 2002 World Cup as an opportunity to campaign against dog meat. FIFA, soccer’s international governing body, urged South Korea to crack down on cruelty to dogs killed for meat. So far, though, the campaign seems to be backfiring.

Media outlets in South Korea have taken offense at what they see as a form of cultural imperialism, which has spurred 20 legislators to introduce a bill that would make the sale of dog meat legal.

Dog meat is apparently eaten mostly by men who believe it increases their virility. Dogs were often cruelly hun and beaten with bats to soften their flesh before they were killed, but South Korea outlawed that practice and now requires that dogs be electrocuted — though whether or not the government vigorously enforces the ban on beating dogs is debatable. It is legal to serve dog meat in South Korea, but it is not legal to sell dog meat as such.

Twenty members of South Korea’s parliament recently introduced a measure which would include dogs within the Livestock Processing Act. This would set out requirements for humanely slaughtering dogs, but would also have the effect of explicitly allowing the sale of dog meat within South Korea.

As for whether or not the concern about dog meat was cultural imperialism, Robert J. Fouser, a professor at Kagoshima University in Japan, wrote an op-ed piece for The Korea Herald. Fouser wrote,

To be sure, those who defend the custom of eating dog meat have logic on their side. Food culture varies widely around the globe, leaving no universal standard from which to determine what is acceptable for human beings to eat. Amid this wealth of culinary diversity in the world, to single out the custom of eating dog meat as barbaric is ridiculous.

Fouser also urged the South Korean media not to depict the controversy over dog meat as a clash of Asian vs. Western cultures. As Fouser wrote,

The problem with reporting on the dog meat controversy is that complaints about dog meat rarely make the headlines in the West because there is so much other news to report. Most people in West know little about Korea and care little about what Koreans eat. The animal rights activists are one of hundreds of special interest groups that focus on a single issue. They have a small group of loyal supporters who pay dues and provide foot soldiers for demonstrations and lobbying activities. Though the protests of animal rights make for splashy news photos, their activities move only tiny numbers of votes in Western countries.

Sounds like he’s got the animal rights movement pretty well pegged.

Sources:

Let dog meat be. Robert J. Fouser, The Korea Herald, December 26, 2001.

Call to legalise dog meat. The BBC, December 28, 2001.

Goats as Malaria Vaccine Factories

So called “farmaceuticals” — genetically engineered animals that express drugs in their milk — has long been predicted as a likely eventual outcome of biotechnology efforts and that possibility took a big step forward with the recent announcement of initial success using mice to produce a malaria vaccine for monkeys. This advances is especially noteworthy since the technique used should scale well to larger animals such as goats, which could have an enormous impact on controlling disease in the developing world.

In this instance, researchers developed mice that secreted an experimental malaria vaccine in their milk. Two separate strains of transgenic mice were created, each of which carried a form of a gene to produce a surface protein of a strain of malaria. The mice were designed so that the gene to produce the proteins could be turned on only by the cells that line the animals’ mammary glands, ensuring that the proteins would be secreted in the milk of the animals.

The vaccine was then purified and injected into monkeys who were then exposed to the malaria parasite. In the extremely small experiment, only one of the five monkeys who received the vaccine contracted malaria, compared to six out of seven monkeys in a control group who did not receive the vaccine.

Doing this with mice is amazing, but here’s where things get very interesting. When researchers designed the mice to express the protein, they used DNA from goats, meaning it should be possible to create goats which also express the protein. In fact Science Daily reports that preliminary, unpublished research suggests the procedure works well in larger animals.

If this result holds, this could revolutionize vaccine research into diseases that largely afflict the developing world. Vaccine research in the developed world is problematic enough. Regulatory and liability issues, combined with expensive manufacturing processes have stunted vaccine research into diseases that still afflict people living in the developed world. When it comes to research on a vaccine for a disease like malaria, those concerns are even larger given the economic situation of much of the developing world (and hence the likelihood that much of the developing world would be unable to afford such a vaccine even if it were available).

Being able to have such medications produced by a herd of goats, however, would drastically lower the costs of such vaccines. Considering that the World Health Organization estimates that as many as 1 million people die annually from malaria-related complications, this technology could have an enormous public health impact.

Sources:

Scientists Milk Animals for Malaria Vaccine. Science Daily, December 18, 2001.

Goats may provide malaria vaccine. The BBC, December 29, 2001.

New Emergency Contraception Laws Now in Effect in California, Illinois

In Illinois and California, laws affecting emergency contraception — the so-called “morning after” pill — went into effect on January 1, 2002. In both states, the new laws are designed to make access to emergency contraception easier.

California took the biggest step, allowing women to obtain emergency contraception directly from pharmacists without first seeing a doctor to obtain a prescription. Jane Boggess, executive director of the Pharmacy Access Partnership which pushed for the change in the law, told the Sacramental Bee,

Women will now be able to go directly to their pharmacists for emergency contraception, which is a significant improvement over having to make an appointment with a doctor or clinic first. Time is of essence with emergency contraception. In order to prevent a pregnancy after unprotected sex, a woman must use emergency contraception within 72 hours.

Illinois, which already allows prescriptions for emergency contraception to be obtained over the Internet, added a mandate which requires hospitals to inform rape victims about emergency contraception. The legislature had originally considered forcing hospitals to provide such drugs to rape victims, but faced opposition from Catholic hospitals that opposed to emergency contraception on religious and ethical grounds.

Source:

New contraception law takes effect. The Sacramento Bee, December 31, 2001.

New state laws pending. Christopher Wills, Associated Press, January 1, 2002.