简体   繁体   English

CakePHP 2.x如何在弹出窗口中打开元素

[英]CakePHP 2.x How to open element in a popup

I've found this plugin for older versions of cakephp, which allows you to open a popup containing an element: https://github.com/webtechnick/CakePHP-Popup-Plugin 我发现该插件适用于cakephp的旧版本,它允许您打开包含元素的弹出窗口: https : //github.com/webtechnick/CakePHP-Popup-Plugin

I couldn't get it to work in Cake 2.x (perhaps it's possible but I just couldn't figure it out). 我无法在Cake 2.x中使用它(也许有可能,但我只是想不通)。 Is there any other alternative to doing this? 除此之外,还有其他选择吗?

After spending a lot of time searching I came to the conclusion that using a javascript addon, for example " lightbox " or " clearbox " (I use the latter), is the easiest and more estetic way to go. 经过大量的搜索,我得出的结论是,使用javascript插件,例如“ lightbox ”或“ clearbox ”(我使用后者)是最简单且更具美感的方式。 Now I can display both pictures and HTML as a kind of popup, but still as part of the same page. 现在,我可以将图片和HTML都显示为一种弹出窗口,但仍可以作为同一页面的一部分。 I haven't managed to open elements this way, but I can open links to views, and at the moment I can live with that. 我还没有设法以这种方式打开元素,但是我可以打开视图的链接,此刻我可以接受。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM