开发者

Dynamically modify itemid based on current menu

I have a site where a series of articles need to show up under two different menus. Depending on the active menu, different modules are displayed. The problem is that the internal links in the articles have an itemid in them which ties them to only one menu.

The solution I have in mind is to modify index.php for the template I use for those menus, and do a search and replace for all internal links - setting the itemid based on the current id. Keeping in mind that mod_rewrite won't work in this situation, is there a graceful way to do this in Joomla?

I suspect that I'd need to take <jdoc:include type="component" /> and, instead of just including the component, read the content into a variable, do the search and replace and spit it back out. How migh开发者_如何学JAVAt I go about doing this?

Are there simpler approaches to this problem?


Just remove the item id from the internal links. By default, the item id should be inherited from the current item.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜