Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-12-26 17:20:51

MikkelM
Member
From: Denmark
Registered: 2004-10-28
Posts: 26
Website

Plugin request: apply $s id to <body> ... ?!

Hi!

I’m looking for a plugin (or a description of what to do) that will print an id to the body-tag according to the $s …

If for example $s = “news” then print <print body id=“body-news”>

or

if $s = “” or !isset($s) then <body> or <body id=“body-something”>

Understandable description?
Thanks in advance!

Cheers
Mikkel M

Offline

#2 2004-12-26 17:22:53

MikkelM
Member
From: Denmark
Registered: 2004-10-28
Posts: 26
Website

Re: Plugin request: apply $s id to <body> ... ?!

oops .. here it is:

If for example $s = “news

Offline

#3 2004-12-26 17:36:16

MikkelM
Member
From: Denmark
Registered: 2004-10-28
Posts: 26
Website

Re: Plugin request: apply $s id to <body> ... ?!

hmm … Guess I could use mdn_if_section …
Any other suggestions?

Offline

#4 2004-12-27 03:16:26

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: Plugin request: apply $s id to <body> ... ?!

have you tried something like < body id=“body-< txp:s / >” >? that’ll at least print the section, although it’ll probably print “default” when nothing is selected.

Offline

#5 2004-12-27 11:36:50

SteveC
New Member
Registered: 2004-11-06
Posts: 9

Re: Plugin request: apply $s id to <body> ... ?!

<body id=”<?php echo “body-”.$s; ?>”>

Offline

#6 2004-12-30 05:52:03

spchampion
Archived Plugin Author
Registered: 2004-06-10
Posts: 62

Re: Plugin request: apply $s id to <body> ... ?!

Hi! Play with spc_section_alias. Consider using the description2 field for this purpose.

Offline

#7 2004-12-30 19:07:22

MikkelM
Member
From: Denmark
Registered: 2004-10-28
Posts: 26
Website

Re: Plugin request: apply $s id to <body> ... ?!

Thanks!

I found out it wasn’t nescessary … But thanks for the help!
TxP is great :)

Offline

Board footer

Powered by FluxBB