Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-01-06 23:51:09

scdoody
Member
Registered: 2006-10-18
Posts: 129

Question about spacing in text pattern tags

I want to have the title of my post be immediately followed by the “excerpt” on the same line. To do this, I tried using this code below – however it puts the title on one line and the excerpt on another.

Is there a solution for this?

My Code:

<p style=“padding:0px 0px 0px 0px; margin:0px; color:#999999;”><span style=“color:#990000;”><txp:title wraptag=”“ /></span>
<txp:excerpt wraptag=”“ /></p>

Offline

#2 2008-01-06 23:57:17

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Question about spacing in text pattern tags

any reason why you’re specifying padding 0px 0px 0px 0px??thats the same thing as padding:0. you could also shorten your color using #999

<txp:title /> and <txp: excerpt /> do not have wraptag attributes. they should sit right next to each other if thats how they’re placed.

whats in your actual form?

Last edited by iblastoff (2008-01-06 23:58:47)

Offline

#3 2008-01-07 00:01:55

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Question about spacing in text pattern tags

I think the excerpt will have it’s own “p” tags unless you turn Textile off for the excerpt in the left sidebar on the Write page. As Steve says, the wraptag attribute doesn’t exist for these tags.

Last edited by thebombsite (2008-01-07 00:03:46)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2008-01-07 00:03:39

scdoody
Member
Registered: 2006-10-18
Posts: 129

Re: Question about spacing in text pattern tags

Here’s my entire form for the full detail of an article posting:

<txp:article_image style=“width:425px;” />

<div style=“margin-top:20px;”>
<img src=”/images/callout-line.gif” style=“padding:0px; magin:0px;”>
<p style=“padding:0px; margin:0px; color:#999;”><span style=“color:#990000;”><txp:title /></span>
<txp:excerpt /></p>
<img src=”/images/callout-line.gif” style=“padding:0px; magin:0px;”</div>

<txp:body />

Offline

#5 2008-01-07 00:04:52

scdoody
Member
Registered: 2006-10-18
Posts: 129

Re: Question about spacing in text pattern tags

Yes – that’s it – you have to select to “leave text untouched” . . . thanks for your help!

Offline

#6 2008-01-07 00:07:41

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Question about spacing in text pattern tags

EDIT: People are fast ;)

It’s because the expert is Textiled and it adds there paragraps. You could use something like:

<div class="hola"><txp:excerpt /><txp:title /></div>

And then in CSS:

.hola p,
.hola ul,
.hola blockquote,
.hola pre {
float: left;
display: inline;
}

Another way is by using PHP.

<txp:php>
$ex = excerpt();
$ex = strip_tags($ex, '<a><strong><em>');
echo $ex.' '.title();
</txp:php>

PS. Don’t use so much of inline styles, it ain’t so smart in the end.

Cheers!

Last edited by Gocom (2008-01-07 00:09:43)

Offline

#7 2008-01-07 00:19:26

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Question about spacing in text pattern tags

@Jukka – We are all just sitting here waiting. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB