Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#11 2018-04-06 10:15:42
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,185
Re: Textile for titles... again, please.
etc wrote #309622:
In 4.7 we get Textile for anything:
<txp:title escape="textile" />...
or
<txp:title escape="tidy,textile" />...
to avoid wrapping the title in
<p />
.
still wrapping my title in <p>
form:
<div class="article">
<txp:if_article_list>
<txp:if_excerpt>
<h2><txp:permlink><txp:title escape="tidy,textile" /></txp:permlink></h2>
<txp:excerpt />
<p class="meta"><txp:permlink>Loe edasi</txp:permlink></p>
<txp:else />
<h2><txp:permlink><txp:title escape="tide,textile" /></txp:permlink></h2>
<txp:body />
</txp:if_excerpt>
<txp:else />
<h1><txp:title escape="tide,textile" /></h1>
<txp:body />
</txp:if_article_list>
</div>
Offline
#12 2018-04-06 10:17:10
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,995
- Website
Re: Textile for titles... again, please.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#13 2018-04-06 10:21:56
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,185
Re: Textile for titles... again, please.
:)
Offline
#14 2018-04-06 10:24:35
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,185
Re: Textile for titles... again, please.
greate new possibility!!
Offline
#15 2018-04-23 22:02:09
- jayrope
- Plugin Author
- From: Berlin
- Registered: 2006-07-06
- Posts: 656
- Website
Re: Textile for titles... again, please.
The tidy
option also works for bodies? That would be … congenial.
a hole turned upside down is a dome, when there’s also gravity.
Offline
#16 2018-04-24 02:58:01
- michaelkpate
- Moderator
- From: Avon Park, FL
- Registered: 2004-02-24
- Posts: 1,341
- Website
Re: Textile for titles... again, please.
jayrope wrote #311341:
The
tidy
option also works for bodies? That would be … congenial.
I was playing around with it a couple of weeks ago. I have a block of code (I’ve linked to it elsewhere – it quickly figures out whether the page is search, category, author or just a standard default page.) The problem is that it left a whole bunch of whitespace on the page. I solved that after years of finding it mildly annoying with:
<txp:output_form form="module-frontpage-type" escape="trim, tidy" />
Now the entire thing gets reduced to one line.
Offline
#17 2018-04-24 08:48:43
- Bloke
- Developer
- From: Leeds, UK
- Registered: 2006-01-29
- Posts: 9,995
- Website
Re: Textile for titles... again, please.
jayrope wrote #311341:
The
tidy
option also works for bodies?
The escape
attribute is global for all tags, so yes, any tag can benefit. Even plugins, as long as they haven’t overridden the core functionality.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#18 2019-12-14 08:21:04
- Pat64
- Plugin Author
- From: France
- Registered: 2005-12-12
- Posts: 1,453
- Website
Re: Textile for titles... again, please.
etc wrote #309648:
Not sure it’s the best way, but here we go:
<a href="<txp:site_url />articles/<txp:article_url_title />"...
Thank you Oleg you save my day!
I got a problem to remove all HTML tags contained into my description (especially the <span> within Caps):
<meta name="twitter:description" content="<txp:excerpt escape="textile,tags,html" />">
Perfect!
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#19 2019-12-14 08:36:05
- colak
- Admin
- From: Cyprus
- Registered: 2004-11-20
- Posts: 8,468
- Website
Re: Textile for titles... again, please.
Pat64 wrote #320516:
Thank you Oleg you save my day!
I got a problem to remove all HTML tags contained into my description (especially the <span> within Caps):
<meta name="twitter:description" content="<txp:excerpt escape="textile,tags,html" />">
Perfect!
This is great! So <txp:smd_wrap_all transform="strip_tags">
is no longer needed?
Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.
Offline
#20 2019-12-14 09:04:14
- Pat64
- Plugin Author
- From: France
- Registered: 2005-12-12
- Posts: 1,453
- Website
Re: Textile for titles... again, please.
Yep. TXP become more and more flexible! One day we’ll never need any plugins 😜
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline