简体   繁体   English

创建自定义的joomla页面

[英]Creating custom joomla pages

I am building in Joomla! 我正在Joomla建房 version 3.3.6 for my first time. 我第一次使用3.3.6版。 I have built a ton of custom Wordpress in the past. 过去,我已经构建了大量的自定义Wordpress。 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. 现在,我知道我不应该开始研究Stack Overflow,因此我在Lynda.com上观看了数小时的初学者教程。 No one seems to be covering this topic. 似乎没有人涵盖这一主题。 Any help would be really appreciated. 任何帮助将非常感激。

To explain this idea, I will compare to what I would do in Wordpress. 为了解释这个想法,我将与在Wordpress中进行比较。 I would create a file named "page-splash.php" and give it a template name: Splash. 我将创建一个名为“ page-splash.php”的文件,并将其命名为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". 最后,我将在wp后端中创建一个“ Page”对象,并为其提供“ splash”的“模板”。

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. 在Joomla中,您可以根据需要在技术上为每个页面安装一个不同的模板。 But in this case, you just need a 2nd template. 但是在这种情况下,您只需要第二个模板。

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) 首先构建一个裸露的模板,如下所示: https : //docs.joomla.org/Creating_a_basic_Joomla!_template (或从/ templates /目录复制当前模板并更新templateDetails.xml文件,以便第二次安装模板)

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. 转到模板管理器,您可以将新模板分配给上一步中定义的菜单项。

You now have 2 independent templates running on the same installation and they can be styled and configured independent of one another. 现在,您可以在同一安装上运行2个独立的模板,并且可以彼此独立地设置样式和配置它们。

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中的一项常见任务,您可以在官方文档中找到有关此模板的更多详细信息: https : //docs.joomla.org/J3.x : Switching_templates

Joomla is by Default not a Blog/Template layout cms, but rather a web application builder. 默认情况下,Joomla不是Blog / Template布局cms,而是Web应用程序构建器。 You can get extensions to create custom templates that make Joomla function like a blog application such as ZOO or K2 . 您可以获取扩展来创建自定义模板,这些模板使Joomla像ZOOK2之类的博客应用程序一样起作用。 I would not go the route of creating individual templates for each page as it would be similar to installing a different theme for each page on a WordPress site. 我不会为每个页面创建单独的模板,因为这类似于在WordPress网站上为每个页面安装不同的主题。

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

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