Makes nested embeds easier to use in multiple templates.
Guess it.
This does one simple thing. It strips the following words out of a provided variable: _detail, _archive, _landing.
Example use:
You have template code that is almost identical for the Articles and News section of your site, except the weblog name is different in each template. You can turn that common code into an embed, and pass in the weblog name as a variable (weblog_name=“news”) Unfortunately, if you have multiple levels of embeds it can be difficult to keep all of the embed variables straight several layers down. If your template name is based on the short name of your weblog, you can use this plugin “guess” the name of the weblog from the template name in the page’s url_title.
If, for example, you have a weblog named “news”, and a template called “news_detail”, this plugin can shorten the word “news_detail” and output the word “news” in the exp:weblog:entries tag. As i mentioned, this is probably really only useful if you have multiple weblogs using the same custom fields, and you have lots of nested embeds. So, all three of you out there that find this useful, cheers!
If you try this plugin out, and would like additional word segments removed by default please let us know what they are. Also, if you want us to go overkill, and actually look up blog names to make sure they exist, let us know, we can add that too.
Categories:
ExpressionEngine,
Plugin