创建自定义的Joomla页面

创建自定义的Joomla页面

本文介绍了创建自定义的Joomla页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是第一次使用 Joomla!版本3.3.6进行构建.过去,我已经构建了大量的自定义Wordpress.我遇到的第一个挑战是要求建立一个看起来与模板页面不一样的页面.客户希望有一个具有大图像和渐变背景的登陆初始页面.但是,他们已经在使用模板.现在,我知道我不应该开始研究Stack Overflow,因此我在Lynda.com上观看了数小时的初学者教程.似乎没有人涵盖这个话题.任何帮助将非常感激.

I am building in Joomla! version 3.3.6 for my first time. I have built a ton of custom Wordpress in the past. The first challenge I have encoutnered, is the requirement of building a page which does not look anything like the template pages. The client desires a landing splash page, with large images and a gradient background. However, they are using a template already. Now, I know that I shouldn't start my research on Stack Overflow, so I've watched hours of tutorials for beginners on Lynda.com. No one seems to be covering this topic. Any help would be really appreciated.

为了解释这个想法,我将与在Wordpress中进行的比较.我将创建一个名为"page-splash.php"的文件,并将其命名为Splash.然后,用我选择的代码填充此页面.最后,我将在wp后端中创建一个"Page"对象,并将其命名为"splash"的模板".

To explain this idea, I will compare to what I would do in Wordpress. I would create a file named "page-splash.php" and give it a template name: Splash. Then I would fill this page with my choice code. Finally I would create a "Page" object in wp backend and give it the "template" of "splash".

推荐答案

这是非常可能的,并且通常在Joomla中完成.

This is very possible and often accomplished in Joomla.

您只需要安装第二个模板并将其分配给页面即可.在Joomla中,如果需要,从技术上讲,您可以为每个页面安装一个不同的模板.但是在这种情况下,您只需要第二个模板.

You would simply need a second template installed and assigned to the page. In Joomla, you could technically have a different template installed for every single page if you wanted to. But in this case, you just need a 2nd template.

首先从构建裸露的模板开始,如下所示: https://docs.joomla.org/Creation_a_basic_Joomla!_template (或从/templates/目录复制当前模板并更新templateDetails.xml文件,以便将其作为第二个模板安装)

Start by building a bare bones template, as found here: https://docs.joomla.org/Creating_a_basic_Joomla!_template (or copy the current template from /templates/ directory and update the templateDetails.xml file so it will install as a second template)

通过扩展管理器安装第二个模板

Install 2nd template via Extension Manager

下一步,确保新页面在菜单管理器内链接(因为您将需要进行菜单分配才能在下一步中调用新模板)

Next, make sure your new page is linked within the Menu Manager (as you will need a menu assignment to call the new template in next step)

转到模板管理器,您可以将新模板分配给上一步中定义的菜单项.

Go to Template Manager and you can assign your new template to the menu item defined in the previous step.

您现在可以在同一安装上运行2个独立的模板,并且可以彼此独立地设置样式和配置它们.

You now have 2 independent templates running on the same installation and they can be styled and configured independent of one another.

分配多个模板是Joomla中的一项常见任务,您可以在官方文档中找到有关此模板的更多详细信息: https://docs.joomla.org/J3.x:Switching_templates

Assigning more than one template is such a common task in Joomla that you can find more details about this in the official documentation: https://docs.joomla.org/J3.x:Switching_templates

这篇关于创建自定义的Joomla页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-02 01:55