Closed (won't fix)
Project:
AdaptiveTheme
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2009 at 05:21 UTC
Updated:
2 Jan 2010 at 18:01 UTC
For those that have a different "default front page" set under '/admin/settings/site-information' ...
e.g. i create the first page/node with a title 'home' and same thing with alias 'home' and under 'default front page' i use
home
instead of
node
you'll probably want to do this to make SEO sense...
note the '!$is_front'
header:
<?php if ($linked_site_logo or $linked_site_name): ?>
<?php if ($title && !$is_front): ?> /* if a title is set and is NOT front/home page */
<div class="logo-site-name"><strong>
<?php if ($linked_site_logo): ?><span id="logo"><?php print $linked_site_logo; ?></span><?php endif; ?>
<?php if ($linked_site_name): ?><span id="site-name"><?php print $linked_site_name; ?></span><?php endif; ?>
</strong></div>
<?php else: /* Use this on front/home ... */ ?>
<h1 class="logo-site-name">
<?php if ($linked_site_logo): ?><span id="logo"><?php print $linked_site_logo; ?></span><?php endif; ?>
<?php if ($linked_site_name): ?><span id="site-name"><?php print $linked_site_name; ?></span><?php endif; ?>
</h1>
<?php endif; ?>
<?php endif; ?>
content:
<?php if ($title or $tabs): ?>
<div id="main-content-header">
<?php if ($title && !$is_front): ?><h1 id="page-title"><?php print $title; ?></h1><?php endif; ?> /* don't print the page title on home/front /*
<?php if ($tabs): ?>
<div class="local-tasks"><?php print $tabs; ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
we don't want to print the h1 in content on the front/home page, we want the h1 to be in the header only for front/home...
e.g. you don't want this printing on home/front:
<div id="header">
<div class="logo-site-name"><strong>SITE NAME</strong></div>
</div><!-- /#header -->
<div id="content">
<h1 id="page-title">home</h1>
</div><!-- /#content -->
you want it to print like this on the home/front:
<div id="header">
<h1><strong>SITE NAME</strong></h1>
</div><!-- /#header -->
<div id="content">
/* content goes here , without h1 /*
</div><!-- /#content -->
Comments
Comment #1
duntuk commentedI didn't properly format the comment under 'content' code... this is the proper:
Comment #2
Jeff Burnz commentedI think it comes down to what is the expected result from the site builders perspective. For example heres a couple of simple use cases:
- I set a node as the front page and I expect it to have a title
- I use the Frontpage view and I choose to set a title for it
- I use a custom Panel to replace the front page and set a title for it
Most decisions in AT are made for accessibility, semantics, web standards and following what I think are the expected results of a users action or decision. The current logic for the page title / site name is for accessibility standards where only one H1 should be used in any one page.
I think you can look at this from different perspectives and at the end of the day, if I don't set a page title for Frontpage View or Panel then the site name will get the H1 on the homepage. If I set a node as the front page and want to suppress the node title I have to do some more work such as using NAT or unsetting the title for that node in preprocess_node function.
I am quite concerned if we changed to the above logic we take away an expected behavior for Views and Panels frontpage should the user wish to set a title for them.
Comment #3
Jeff Burnz commentedMarking as wont fix, I'm not sure this is the right way to go and would like to freeze 6.x-2.x.