Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2012-11-21 16:04:37

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

Oleg … because every <p> has a margin-bottom: 1.618em; … and so the empty ones too. If there weren’t empty <p>’s I could easily see it.

Offline

#12 2012-11-21 18:22:51

etc
Developer
Registered: 2010-11-11
Posts: 3,081
Website

Re: Can I escape <p> without Textile?

Joop, there are empty <p>, but they are created by the browser, not by Textpattern/Textile. If you look at the code of your article, say by clicking <> (HTML) button in the edit tab, you will see something like <p><txp:lightbox_more id="6,25,47" label="" rel="schilderijen" /></p>. It will be transformed into <p><ul>...</ul></p> by txp parser and served like this to the visitors browser. The browser will rightly consider it as invalid markup and unwrap <ul> from <p>, thus leaving empty <p> behind.

That’s my theory, to confirm or otherwise, replace <txp:body /> in article form by (with linebreak)

<rah_replace from="<p><ul,</ul>
</p>" to="<ul,</ul>">
  <txp:body />
</rah_replace>

Textile probably shouldn’t wrap txp: tags in paragraphs, but currently it does.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#13 2012-11-21 19:20:55

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

Sorry Oleg, it doesn’t work!

Offline

#14 2012-11-21 19:27:44

etc
Developer
Registered: 2010-11-11
Posts: 3,081
Website

Re: Can I escape <p> without Textile?

It will, simply something is broken, I see " to=""> on your page. What is the exact code you use?


etc_[ query | search | pagination | date | tree | cache ]

Offline

#15 2012-11-21 19:31:36

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

Oh … it’s a leftover from some trial and error … it’s gone now.

Offline

#16 2012-11-21 19:51:09

etc
Developer
Registered: 2010-11-11
Posts: 3,081
Website

Re: Can I escape <p> without Textile?

Well, if it’s still there, then out the tank: replace <txp:body /> with

<txp:etc_query data='<txp:body />' replace="//p[not(node())]" />

Last edited by etc (2012-11-21 20:03:18)


etc_[ query | search | pagination | date | tree | cache ]

Offline

#17 2012-11-21 20:26:04

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

Oops >

Tag foutmelding <txp:etc_query data=’<txp:body />’ replace=”//p[not(node())]” /> -> Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given bij het verwerken van module “single_nolink” op pagina “kostuums”
Tag foutmelding <txp:etc_query data=’<txp:body />’ replace=”//p[not(node())]” /> -> Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given bij het verwerken van module “single_nolink” op pagina “kostuums”
Tag foutmelding <txp:smd_thumbnail id=“9” type=“main” /> -> Textpattern Notice: Onbekende afbeelding bij het verwerken van module “single_nolink_sidebar” op pagina “kostuums”
Tag foutmelding <txp:etc_query data=’<txp:body />’ replace=”//p[not(node())]” /> -> Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given bij het verwerken van module “single_nolink” op pagina “kostuums”
Tag foutmelding <txp:etc_query data=’<txp:body />’ replace=”//p[not(node())]” /> -> Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given bij het verwerken van module “single_nolink” op pagina “kostuums”
Tag foutmelding <txp:etc_query data=’<txp:body />’ replace=”//p[not(node())]” /> -> Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given bij het verwerken van module “single_nolink” op pagina “kostuums”
Tag foutmelding <txp:etc_query data=’<txp:body />’ replace=”//p[not(node())]” /> -> Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given bij het verwerken van module “single_nolink” op pagina “kostuums”
Tag foutmelding <txp:etc_query data=’<txp:body />’ replace=”//p[not(node())]” /> -> Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given bij het verwerken van module “single_nolink” op pagina “kostuums”
Tag foutmelding <txp:etc_query data=’<txp:body />’ replace=”//p[not(node())]” /> -> Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given bij het verwerken van module “single_nolink” op pagina “kostuums”

Last edited by RedFox (2012-11-21 20:34:51)

Offline

#18 2012-11-21 20:34:23

etc
Developer
Registered: 2010-11-11
Posts: 3,081
Website

Re: Can I escape <p> without Textile?

Looks like single_nolink form does not exists? Ah, sh.., your php version is too old (should be at least 4.3.8 5.3.8). Well… back to rah_replace or let it be? :)

Edit: it was php 5.3.8, of course.

Last edited by etc (2012-11-22 09:01:04)


etc_[ query | search | pagination | date | tree | cache ]

Offline

#19 2012-11-21 20:36:35

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

Offline

#20 2018-10-09 10:59:02

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 734
Website

Re: Can I escape <p> without Textile?

It’s 2018 and I still having <p>‘s all over the place. Using smd_macro gives:

<p></p><figure><p></p><img>...

Correct styling can’t be done. They have to leave. I’ve looked into etc_query and smd_query but that’s far beyond my scope. Can somebody help me, please!

And yes, I can use Textile but it isn’t what my client likes.

Last edited by RedFox (2018-10-09 11:03:49)

Offline

Board footer

Powered by FluxBB