[英]Web CMS Performance: pages/second (Joomla, Drupal, Plone, WP)
[英]CSS for web pages in joomla
我是网页设计的新手。 我使用Joomla 3创建了一个书店网站。 我已经按照喜欢使用CSS的方式设计了主页,问题是我想在网站上设置其他网页的样式,但是我不能。
我正在使用具有index.php文件和style.css文件的自制准系统模板。 我用于主页的CSS代码在style.css文件中。 我需要为网站的“关于页面”之类的页面创建另一个css文件,以便我可以按自己的方式设置样式,但我不知道该怎么做。
主菜单具有以下链接:主页,关于我们,教科书,文学书籍,文具等
下面是我的index.php文件的快照。
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
$doc = JFactory::getDocument();
$doc->addStyleSheet($this->baseurl . '/media/jui/css/bootstrap.min.css'); /* to add bootstrap */
$doc->addStyleSheet($this->baseurl . '/media/jui/css/bootstrap-responsive.css'); /* to add bootstrap responsiveness */
$doc->addStyleSheet('templates/' . $this->template . '/css/style.css');
$doc->addScript('/templates/' . $this->template . '/js/main.js', 'text/javascript');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<html>
<head>
<jdoc:include type="head" />
</head>
<body>
<div class='header'></div>
<!-- main container -->
<div class='main_container'>
<!-- Main Menu -->
<div class='logo_main_menu'>
<div class='logo'>
</div>
<div class='main_menu'>
<jdoc:include type="modules" name="position-7" style="well" />
</div>
在某些特殊情况下,您需要/需要在一个Joomla安装上运行多个模板。 您可以创建一个额外的裸露模板,安装,然后通过模板管理器进行分配。
在模板管理器中,您可以在网站的每个页面上分配不同的模板。
因此,您可能正在寻找的解决方案是使用几个不同的模板来运行单独的页面。
使用以下代码,您可以确定首页和其他页面,并应用每一页所需的更改。
参考: https : //docs.joomla.org/How_to_determine_if_the_user_is_viewing_the_front_page
如何确定用户是否正在查看首页
1.6 / 1.7 / 2.5中有一些差异,以避免严格标准错误。 对于所有内容都使用相同语言的网站,请使用以下代码:
<?php $app = JFactory::getApplication(); $menu = $app->getMenu(); if ($menu->getActive() == $menu->getDefault()) { echo 'This is the front page'; } ?>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.