Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-05-28 17:03:11

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: doWrap

Okay. So how do I suppose to get a br in a single result?


<txp:Ruhh />

Offline

#14 2008-05-28 17:28:58

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: doWrap

Use your own PHP :)

Offline

#15 2008-05-29 00:14:26

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: doWrap

Is something like this what you are looking for?

<p>
Live: <txp:soc_numarticle status="live" /><br />
Pending: <txp:soc_numarticle status="pending" /><br />
Hidden: <txp:soc_numarticle status="hidden" /><br />
Sticky: <txp:soc_numarticle status="sticky" />
</p>

Offline

#16 2008-05-29 19:07:24

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: doWrap

Yeah. Something like that but without the <br /> being added by the user and have the tag automatically give a break tag.


<txp:Ruhh />

Offline

#17 2008-05-29 23:48:54

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: doWrap

You could replace this:

return doLabel($label, $labeltag) . doWrap($out, $wraptag, $break, $class);

with this, if all you need is a single value with a break.

 
$result = $out .'<br />';
return $result;

Offline

#18 2008-05-30 00:05:42

Ruhh
Member
From: dakota dunes
Registered: 2008-01-20
Posts: 305

Re: doWrap

Well I would do that but in order for the user to choose a value for the break tag, I would rather provide the attribute so the user can choose to keep the default or use a different break tag.


<txp:Ruhh />

Offline

#19 2008-05-30 00:48:32

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: doWrap

Build a more complex html string to return using $break rather than raw text. You are kinda building your way back up to doWrap that way though. Better to be clear on your concept and use the proper helper functions. Is a single return value what you are trying to accomplish, or a list of values with the attribute flexibility you describe?

Offline

Board footer

Powered by FluxBB