Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-02-23 22:48:45

kkobashi
Member
Registered: 2008-01-27
Posts: 51
Website

How do I detect front page?

I have a head form that looks like the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title><txp:page_title /></title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="<txp:css />" type="text/css" title="" media="screen" />
</head>

However, this is global across the entire site. I want the slogan to go like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title><txp:page_title /> | <txp:site_slogan /></title>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="<txp:css />" type="text/css" title="" media="screen" />
</head>

But only on the front page. How do detect the front page?

(edited: added bc. for better code display. -Els)

Last edited by els (2008-02-23 22:53:11)


Kerry Kobashi
Kobashi Computing

Offline

#2 2008-02-23 22:54:08

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How do I detect front page?

<title><txp:page_title /><txp:if_section name=""> | <txp:site_slogan /></txp:if_section></title>

Offline

#3 2008-02-24 00:19:30

kkobashi
Member
Registered: 2008-01-27
Posts: 51
Website

Re: How do I detect front page?

Thank you Els

Last edited by kkobashi (2008-02-24 00:20:53)


Kerry Kobashi
Kobashi Computing

Offline

#4 2008-02-24 06:55:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: How do I detect front page?

I found the default method as rightly indicated by els just reduces section="" to the front page. glx_if differentiates the front page from the rest of the section.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2008-02-24 16:19:30

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How do I detect front page?

colak

I use wet_if_page to do that. This is a more recent plugin and the author is still around :)

Offline

Board footer

Powered by FluxBB