Joomla中的多个列文章 [英] Multiple column articles in Joomla

查看:129
本文介绍了Joomla中的多个列文章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个客户端要求文章在Joomla中显示为两列,有时是三列。我相当确定他们不会很高兴为3列编辑3篇文章,所以分裂将必须自动完成。



我做过类似的事情之前,它会把一大块的HTML分成n列,但没有真正的想法如何完成这个Joomla本身。



任何想法非常感谢!

解决方案

/ p>

使用Javascript在浏览器的多列中分割文章。



优点(第一种方法):



  • 由于Javascript可以知道段落在浏览器中实际具有的高度(取消链接PHP),因此您可以更精确地找到最佳分割。
  • 这可以在模板php-File中实现:你告诉模板包含js-File。因此,它可以做成上下文相关,
    例如:如果左列折叠(因为它没有模块),告诉JavaScript文件初始化为3列,否则2列。


但是,请记住,对于已禁用Javascript的用户来说,它应该可以使用。


I've got a client that requires that an article be displayed in two, sometimes three, columns in Joomla. I am fairly sure they won't be happy with having to edit 3 articles for 3 columns so the splitting would have to be done automatically.

I've done something similar before where it'll split a chunk of HTML into n columns, but have no real idea how to accomplish this within Joomla itself.

Any ideas gratefully recieved!

解决方案

An alternative approach:

Use Javascript to split up the Article in several column in the browser. Here I could imagine a full-automated approach could work.

Advantages (over the first approach):

  • As Javascript can know, which height the paragraphs actually have in the browser (unlinke PHP), you could find the optimum split more accurately.
  • This can be implemented in the template php-File: you tell the template to include the js-File. So it could be made context-dependent,
    E.g.: If the left column is collapsed (because there are no modules in it), tell the JavaScript-File to initialize to 3 columns, else 2 columns.

However, have in mind that it should rest usable for those who have Javascript disabled.

这篇关于Joomla中的多个列文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆