doujiaozhan4397 2011-01-10 08:51
浏览 72
已采纳

在Joomla中打开页面

I'm using Jumi to echo php code and then showing that in a Joomla Article, and everythings working fine. Now I want to do this:

The output is basically a list from a database like this:

Name    Price    Type
A       1        T1
B       2        T2

In this list I want to include links to only show items of the same type, so "T1" would like to a page only showing things of type T1. So I thought I would do this by making a new page that takes a type and then get all the items of that type from the database. Without Joomla this wouldv'e been a piece of cake, with Joomla I'm not quite sure where to begin.

How should the a href=... tags in the html code printed by my php script look?
Is my basic structure still correct, and if so, how do I make Joomla open the new page in the normal frame and not replace the whole Joomla page. some kind of target-frame attribute?

EDIT:
I know I should be using a component instead, however I just need to get this working before going on vacation in three days. I will do it properly when I get back. I don't mind if the entire page reloads, what I do need is the Joomla menu, header-banner and other things around the page to be loaded as well. If I just use a href=mypage.php I assume the header and everything around it will disappear.

  • 写回答

1条回答 默认 最新

  • doulongsha5478 2011-01-10 09:44
    关注

    I think you are going about this all wrong. You shouldn't be using Jumi to run php in your articles. You should design a component. Although this will take a tiny bit longer to setup initially it will save you time in the long run and prove to be much more flexible than using Jumi in a single article. Have a look here on how to create a Joomla component - http://www.joomladevuser.com/tutorials/components.

    a href= tags should not be any different from any other html you have ever used.

    E.g. echo '<a href="http://.....">link</a>';

    To make just the frame/div/table/etc reload rather than the entire page you will need to implement some AJAX. I have answered a question on how to do this with Joomla components before, see here: how to use Jquery AJAX in Joomla Components?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?