创建自定义 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/创建_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
相关文章