Textpattern CMS support forum

You are not logged in. Register | Login | Help

#41 2009-02-14 19:11:37

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] chh_if_data

nabrown78 wrote:

…is that what you’re thinking?

Yes. Similar to the code in this TXP Tip.

Offline

#42 2011-02-10 16:12:53

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] chh_if_data

It should work, what’s your code?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#43 2011-02-10 16:16:06

gfdesign
Member
From: Argentina
Registered: 2009-04-20
Posts: 401

Re: [plugin] [ORPHAN] chh_if_data

Gracias Maniqui por responder tan rápido.
Tenía mal la sintaxis en mi código.
(Por eso borré mi mensaje, hasta que lo descubrí)
:P

Offline

#44 2011-02-14 19:45:51

gfdesign
Member
From: Argentina
Registered: 2009-04-20
Posts: 401

Re: [plugin] [ORPHAN] chh_if_data

Help again.
I´ve created this form but when I hide this article (or delete all text), whom calls to this form, the static texts display anyways.
Any idea?

<txp:chh_if_data>
<div class="module06">
<h2>SERVICES</h2>
<div class="contenido">
<txp:article_custom form="resume" pgonly="0" limit="1" section="services" sort="Posted asc" status="5" />
<div class="bt01"><a href="<txp:site_url />services">See all</a></div>
</div>
</div>
</txp:chh_if_data>

Thanks

Offline

#45 2011-02-14 19:56:01

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] chh_if_data

That’s because <txp:site_url /> will always return something (some ‘data’), so it will make chh_if_data to evaluate to true…
You could simple do:

<a href="/services">...

if your TXP site lives on the root of your domain.
Or:

<a href="/folder/services">...

If it lives in /folder/.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#46 2011-02-14 20:03:39

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] chh_if_data

<txp:variable name="has-services-article" value='<txp:article_custom section="services" limit="1" status="5">yes</txp:article_custom>' />

<txp:if_variable name="has-services-article" value="yes">
<div class="module06">
<h2>SERVICES</h2>
<div class="contenido">
<txp:article_custom form="resume" limit="1" section="services" sort="Posted asc" status="5" />
<div class="bt01"><a href="<txp:site_url />services">See all</a></div>
</div>
</div>
</txp:if_variable>

Last edited by Els (2011-02-14 20:04:36)

Offline

#47 2011-02-14 20:14:53

gfdesign
Member
From: Argentina
Registered: 2009-04-20
Posts: 401

Re: [plugin] [ORPHAN] chh_if_data

Yes, You´re right. Thanks to both
I´m feeling a dumb xP
Thanks // Gracias

Offline

#48 2015-08-04 03:20:53

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,225
Website

Re: [plugin] [ORPHAN] chh_if_data

adi_if_content released.

Offline

Board footer

Powered by FluxBB