Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-25 16:21:53

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Can excerpts not be wrapped with <p>

I want to include the excerpt in a list of articles, using CSS to make the font smaller.

However, the output is always wrapped in the <p> tags.

Can this be avoided in any way?

Offline

#2 2007-03-25 16:38:43

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Can excerpts not be wrapped with <p>

Turn off textile for the excerpt. Then create a custom form containing the excerpt and other stuff marked up to suit your needs. eg…

<p class="excerpt>
  <txp:excerpt/>
</p>

or you can leave textile on, and use a wrapping div like…

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

then style like .excerpt p{font-size:9px}

Last edited by mrdale (2007-03-25 16:39:10)

Offline

#3 2007-03-25 17:02:44

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: Can excerpts not be wrapped with <p>

Thanks for the prompt answer :)

I’ve actually got ‘Leave text untouched’ for the excerpt and this for in a custom form:

<span class=“text-small”><txp:excerpt /></span>

But I still get:

<span class=“text-small”><p>Introduction.</p></span>

How odd.

Last edited by lozmatic (2007-03-25 17:04:53)

Offline

#4 2007-03-25 17:14:25

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

Re: Can excerpts not be wrapped with <p>

Did you try “convert linebreaks?” Alternatively leave textile on and start the excerpt with a space.

Last edited by colak (2007-03-25 17:15:16)


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 2007-03-25 18:09:16

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

Re: Can excerpts not be wrapped with <p>

If you make changes in whether or not to use Textile, you have to re-save the articles, to overwrite the previously saved html.

Offline

Board footer

Powered by FluxBB