简体   繁体   English

Joomla数据库定制

[英]Joomla DB Customizing

I'm new to Joomla (3). 我是Joomla的新手(3)。 I've researched a bit but could not find an exact match for what I need to know. 我进行了一些研究,但找不到与我需要了解的完全匹配的内容。

I need to create other categories (not referring to Joomla "categories") in the mysql DB so I can assign them to each article (not Tags). 我需要在mysql数据库中创建其他类别(而不是Joomla“类别”),以便可以将它们分配给每篇文章(而不是标签)。 These would control how each article is formatted in the layout. 这些将控制每篇文章在版式中的格式。

So let's say Article->Type1 = .classType1 in the layout and Article->Type2 = .classType2 in the layout. 因此,假设布局中的Article-> Type1 = .classType1,布局中的Article-> Type2 = .classType2。

So my basic question is: how would you go about adding data to the Joomla db outside of the basic table that's created - is it a simple process, can it be done withing the framework or do I have to code extra stuff?? 所以我的基本问题是:如何将数据添加到已创建的基本表之外的Joomla数据库中?这是一个简单的过程吗?是否可以在框架中完成?还是必须编写额外的代码?

I hope I'm clear in my question... 我希望我清楚我的问题...

Thanks 谢谢

I think what you want is to "control the article layout" on an individual basis. 我认为您想要的是根据个人情况“控制文章布局”。 You don't need to do anything specific for this as Joomla supports this already. 您不需要为此做任何特定的事情,因为Joomla已经支持了这一点。 Here is a parallel StackOverflow question: JOOMLA, Best way to make alternate layouts for articles? 这是一个平行的StackOverflow问题: JOOMLA,为文章制作备用布局的最佳方法吗?

It also has additional links to get you started. 它还具有其他链接以帮助您入门。

A quick and "dirty" way would be to simply wrap all the text in the article content in a div with a specific class and then you can override the default layout/styles accordingly. 一种快速且“肮脏”的方法是,将具有特定类的div中的文章内容中的所有文本简单地包装起来,然后可以相应地覆盖默认的布局/样式。

My personal opinion is try and learn how to create alternate layouts - which is really what you want and once you know how to do it will also be fun to work with. 我个人的观点是尝试学习如何创建替代布局-这确实是您想要的,一旦您知道如何做,使用它也会很有趣。

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

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