Although BeansTag is not going to be approved as a Drupal 7 module, i still added some features to it as requested by the BeansTag users. But before i talk about the new features, i want to clarify a BeansTag concept
BeansTag depends directly on the url path.
For example, a node with nid = 1 has an url alias articles/abc, you can create 2 different BeansTags with the following paths.
The above 2 pages could have different titles and meta tags.
Here are the new BeansTag features.
2. Token support
We can use now tokens in BeansTag. but please make sure a proper token is used. For example, if you use node token in a term page, the node token will never be substituted by the correct value.
Here is another token example.
Assume the url alias of node with nid 1 is one/two/three.
- [current-page:url:unaliased:args:value:0] => node
- [current-page:url:unaliased:args:value:1] => 1
- [current-page:url:args:value:0] => one
- [current-page:url:args:value:1] => two
- [current-page:url:args:value:2] => three
3. * support in BeansTag path alias
Consider the following case.
i) france/paris/* can be used in BeansTag path alias. but it must be end with *, sth like france/*/paris WOULD NOT WORK.
ii) Assume you have the following 3 BeansTags
– BeansTag A: france/paris/eiffel-tower
– BeansTag B: france/paris/*
– BeansTag C: france/*
- If france/paris/eiffel-tower url is shown, BeansTag A will be applied becoz it has the exact match.
- If france/paris/palace-of-versailles url is shown, BeansTag B will be applied. Although BeansTag C also match the url, the url pattern is less matched compared to BeansTag B.
- If france/paris url is shown, BeansTag C will be applied since it is the only match.