blog_style_default_item_title.php
2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('JPATH_BASE') or die;
// Create a shortcut for params.
$params = $displayData->params;
$canEdit = $displayData->params->get('access-edit');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
?>
<?php if ($displayData->state == 0 || $params->get('show_title') || ($params->get('show_author') && !empty($displayData->author ))) : ?>
<div class="page-header">
<?php if ($params->get('show_title')) : ?>
<h2 itemprop="name">
<?php if ($params->get('link_titles') && ($params->get('access-view') || $params->get('show_noauth', '0') == '1')) : ?>
<?php
//インフォメーション系のページでタイトルのリンク先を変更
$url = JRoute::_(ContentHelperRoute::getArticleRoute($displayData->slug, $displayData->catid, $displayData->language));
$tmp = explode("/", $url);
$end_word = end($tmp);
//echo "URL>".$end_word;
?>
<?php if(JRequest::getInt('Itemid') == 808 || JRequest::getInt('Itemid') == 809 || JRequest::getInt('Itemid') == 810 || JRequest::getInt('Itemid') == 811 || JRequest::getInt('Itemid') == 812 || JRequest::getInt('Itemid') == 794 || JRequest::getInt('Itemid') == 796 || JRequest::getInt('Itemid') == 797 || JRequest::getInt('Itemid') == 798 || JRequest::getInt('Itemid') == 799 || JRequest::getInt('Itemid') == 575){
?>
<a href="<?php echo "information/".$end_word; ?>" itemprop="url">
<?php echo $this->escape($displayData->title); ?>
</a>
<?php }else{ ?>
<a href="<?php echo JRoute::_(
ContentHelperRoute::getArticleRoute($displayData->slug, $displayData->catid, $displayData->language)
); ?>" itemprop="url">
<?php echo $this->escape($displayData->title); ?>
</a>
<?php } ?>
<?php else : ?>
<?php echo $this->escape($displayData->title); ?>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php if ($displayData->state == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if (strtotime($displayData->publish_up) > strtotime(JFactory::getDate())) : ?>
<span class="label label-warning"><?php echo JText::_('JNOTPUBLISHEDYET'); ?></span>
<?php endif; ?>
<?php if ($displayData->publish_down != JFactory::getDbo()->getNullDate()
&& (strtotime($displayData->publish_down) < strtotime(JFactory::getDate()))
) : ?>
<span class="label label-warning"><?php echo JText::_('JEXPIRED'); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>