Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-10-26 05:49:16

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,187
Website

Weird handling of tags (4.7 dev)

I have this code to build a main navigation:

<ul><txp:section_list default_title="Home" include_default="1" wraptag="" break="" exclude="contact,downloads,search">
<li<txp:if_section name='<txp:section />'> class="active-menu"</txp:if_section>><txp:section title="1" link="1" /></li></txp:section_list></ul>

Ok, the list appears, but the class name (active-menu) is not applied correctly – on the front page, it is applied on all li’s, on other pages it evaluates to false always. (error can be reproduced with the default templates that ship with TXP).

Another weird thing:

<txp:if_section name="search"><txp:hide>NOTHING</txp:hide>
<txp:else />
<txp:output_form form="search-widget" />
</txp:if_section>

On the /search page, the search-widget appears. It should not. (/search is a section on its own, uses the default template)

I see more weirdness with <txp:if_variable>. The following, at theta of my default page template

<txp:if_section name=",">
  <txp:variable name="page" value="front-page" />
</txp:if_section>
<txp:if_category>
  <txp:variable name="page" value="category-page" />
  <txp:else />
    <txp:if_author>
      <txp:variable name="page" value="author-page" />
      <txp:else />
      <txp:if_section name="about,articles,development,downloads,notebook,search">
        <txp:variable name="page" value="section-page" />
      </txp:if_section>
    </txp:if_author>
</txp:if_category>

The variable front-page is either never set or evaluates to false. With TXP 4.6.x, the above worked fine to detect the front-page, as opposed to category / author and other pages that are build upon the default template.

I suspect something is busted with txp:if_section and/or txp:section.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#2 2016-10-26 08:30:37

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,187
Website

Re: Weird handling of tags (4.7 dev)

Appears to be fixed by this commit.

Oups!


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#3 2016-10-26 10:09:40

etc
Developer
Registered: 2010-11-11
Posts: 5,187
Website GitHub

Re: Weird handling of tags (4.7 dev)

Sorry, me (again!) was a copy-paste victim. And and is not &&

Offline

#4 2016-11-06 05:39:21

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,187
Website

Re: Weird handling of tags (4.7 dev)

Similar: <txp:if_search_results> returns nothing.

Oleg, something to keep you from getting bored? I put it as a Github issue.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#5 2016-11-06 11:55:34

etc
Developer
Registered: 2010-11-11
Posts: 5,187
Website GitHub

Re: Weird handling of tags (4.7 dev)

phiw13 wrote #302687:

Similar: <txp:if_search_results> returns nothing.

Oleg, something to keep you from getting bored? I put it as a Github issue.

Yep, that was me again. Fixed, thanks, Philippe.

Offline

#6 2016-11-06 12:11:03

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,187
Website

Re: Weird handling of tags (4.7 dev)

etc wrote #302692:

Yep, that was me again. Fixed, thanks, Philippe.

Work fine again. Cools

Now if only I could remember what exactly it was I wanted to experiment with when I started looking at search results…


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB