Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-04-21 22:52:18

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [plugin] [ORPHAN] chh_if_data

As far as I understand, this plugin works only with textpattern tags, and not with other plugin tags… but maybe I’m wrong.

Offline

#14 2006-05-10 06:06:04

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: [plugin] [ORPHAN] chh_if_data

Dragan wrote:

I wanted to use this plugin to control the output the category links, because when I don’t assign a category2 it outputs an empty a element, and I don’t want that to happen. So I need something along these lines: if there is a category2 assigned output it, if there isn’t, output nothing. Can this be done?

This will produce the two category names, separated by a comma:

<txp:category1 title="1" link="1" /><txp:if_article_category number="2">, <txp:category2 title="1" link="1" /></txp:if_article_category>

Offline

#15 2006-05-10 06:19:14

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [plugin] [ORPHAN] chh_if_data

You can use the else tag.

if_data … txp-tag … else …. other tag …. if_data

Offline

#16 2006-05-11 00:41:48

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: [plugin] [ORPHAN] chh_if_data

Suggested enhancement

Support testing more than one Txp tag per <txp:chh_if_data> block; provide something like a comparison attribute that can be set to “and” or “or” for the following effect:

  • comparison="or" — plugin returns “true” if any of the enclosed tags produce data
  • comparison="and" — plugin returns “true” if all of the enclosed tags produce data

Thanks for all the cool plugins. Keep up the awesome work. :-)

Offline

#17 2006-06-21 11:28:03

jufemaiz
Archived Plugin Author
From: nth narrabeen, sydney, nsw, au
Registered: 2005-03-17
Posts: 91
Website

Re: [plugin] [ORPHAN] chh_if_data

charisomp: there’s an if_variable that works for jmc_event_manager

more info


BE + MEngSc = engineer with a side dish of frustrated designer/developer with a penchant for photography outside

Offline

#18 2006-11-06 00:24:28

scdoody
Member
Registered: 2006-10-18
Posts: 129

Re: [plugin] [ORPHAN] chh_if_data

I uploaded the plugin and added the plugin code to my site. But I get this message:

tag_error <txp:chh_if_data> -> Textpattern Warning: unknown_tag: chh_if_data on line 968

I assume the unknown_tag is because there is something wrong with the plugin upload? How do I know if the plugin was installed correctly?

Thanks!

Offline

#19 2006-11-06 00:54:12

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [plugin] [ORPHAN] chh_if_data

This may sound silly, but did you double check that it was enabled?

Offline

#20 2006-11-06 01:16:39

scdoody
Member
Registered: 2006-10-18
Posts: 129

Re: [plugin] [ORPHAN] chh_if_data

I checked and it says that it installed correctly. Here is my code on my mail default display page:

<txp:article limit=“4” />

<txp:chh_if_data>

<txp:if_individual_article > <p><txp:link_to_prev><txp:prev_title /></txp:link_to_prev> <txp:link_to_next><txp:next_title /></txp:link_to_next></p>
<txp:else /> <p style=“float:right; padding:0px 0px 15px 0px;”><txp:older><txp:text item=“Next Page >>” /></txp:older> </p>

<p style=“float:left;”><txp:newer><txp:text item=”<< Previous Page”/></txp:newer></p>
</txp:if_individual_article>
<txp:else /> <p>article_custom had nothing to say.</p>
</txp:chh_if_data>

Any thoughts on why I am getting the unknown tag error of:

tag_error <txp:chh_if_data> -> Textpattern Warning: unknown_tag: chh_if_data on line 968

Thanks.

Offline

#21 2006-11-06 08:21:37

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [plugin] [ORPHAN] chh_if_data

You should enclose just one tag with chh_if_data to make sure, the plugin works properly.

The example you mention above can be easily done with if_individual_artile and if_articlelist. This are two tags that come out-of-the-box along with textpattern

Offline

#22 2006-11-08 03:24:20

scdoody
Member
Registered: 2006-10-18
Posts: 129

Re: [plugin] [ORPHAN] chh_if_data

I did a test and know that the plugin is now enabled and installed correctly.

However, I am having trouble understanding where I am supposed to position my code within the chh_if_data. Here is what I have so far. In the code below, I have a block at the bottom commented out – I want this text to display when a category does not have any articles. So for example, if someone is on the homepage of my blog and then clicks a category with no articles, the ‘no articles . . .“message would display.

Please let me know where I should position the chh_if_data code to make this happen. I’ve tried a number of times but I haven’t found a good solution.

<!—- center—->
<div id=“contenthome”>

<txp:article limit=“8” />

<txp:if_individual_article > <p><txp:link_to_prev><txp:prev_title /></txp:link_to_prev></p> <p><txp:link_to_next><txp:next_title /></txp:link_to_next></p>
<txp:else />

<p style=“float:left;”><txp:newer><txp:text item=”<< Previous Page”/></txp:newer></p>
<p style=“float:right; padding:0px 0px 15px 0px;”><txp:older><txp:text item=“Next Page >>” /></txp:older> </p>

</txp:if_individual_article>

<!—-<h3 style=“font-family: Arial, Helvetica, sans-serif; font-size:1.5em; text-transform:uppercase; color:#DB0455;”><txp:category /></h3>
<p>There are not any articles in this category yet.</p>
<p> If you know of a stylish and modern product or service that you think we should feature, please <a href=“http://www.stylemodern.com/index_test.php?s=Conotact”>contact us</a>. </p> —->
</div>

Offline

#23 2006-12-04 22:44:20

simmerdesign
Member
From: Eden Prairie, MN
Registered: 2006-01-03
Posts: 19
Website

Re: [plugin] [ORPHAN] chh_if_data

I’m in the same boat – can’t figure out where to put the chh_if_data tags to produce the “no articles” response. I’d love a peek at someone’s working example.

Offline

#24 2006-12-05 16:31:24

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] chh_if_data

This should work:

<txp:chh_if_data>
                <txp:article limit="8" />
<txp:else />
                <h3 style="font-family: Arial, Helvetica, sans-serif; font-size:1.5em; text-transform:uppercase; color:#DB0455;"><txp:category /></h3>
                <p>There are not any articles in this category yet.</p>
                <p> If you know of a stylish and modern product or service that you think we should feature, please <a href="http://www.stylemodern.com/index_test.php?s=Conotact">contact us</a>.  </p>
</txp:chh_if_data>

Remember not to wrap more than one txp tag in the chh_if_data tags.

Offline

Board footer

Powered by FluxBB