Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2006-06-01 12:16:26

johnny_fx
New Member
From: Bulgaria
Registered: 2006-04-27
Posts: 8
Website

Re: in a section, choice of viewing articles by date or category

Mary wrote:

<p>Question: what is your favourite kind of dark carbonated beverage?</p>

<ul>
	<li><a href="?soda=root-beer">A&amp;W Root Beer</a></li>
	<li><a href="?soda=coke">Coca-Cola</a></li>
	<li><a href="?soda=pepsi">Pepsi</a></li>
</ul>

<txp:chs_urlvar_default var="soda">

	<txp:chs_if_urlvar var="soda" value="root-beer">
		<p>Your answer: A&amp;W Root Beer Root Beer</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="coke">
		<p>Your answer: Coca-Cola</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="pepsi">
		<p>Your answer: Pepsi</p>
	</txp:chs_if_urlvar>

</txp:chs_urlvar_default>

Why this doesn’t work for me.

I always get this errors:

<code>
tag_error <txp:chs_urlvar_default var=“soda”> -> Notice: Undefined index: soda on line 8
tag_error <txp:chs_if_urlvar var=“soda” value=“root-beer”> -> Notice: Undefined index: soda on line 3
tag_error <txp:chs_if_urlvar var=“soda” value=“coke”> -> Notice: Undefined index: soda on line 3
tag_error <txp:chs_if_urlvar var=“soda” value=“pepsi”> -> Notice: Undefined index: soda on line 3
</code>

Offline

#17 2006-06-01 13:31:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: in a section, choice of viewing articles by date or category

You’ll need to talk to the plugin’s creator to fix it, but, if you change your production status from debugging Textpattern will hide those notices.

Offline

#18 2006-06-02 07:20:48

johnny_fx
New Member
From: Bulgaria
Registered: 2006-04-27
Posts: 8
Website

Re: in a section, choice of viewing articles by date or category

Yes I can hide the notices, but the real problem is that the plugin doesen’t work.

Offline

#19 2006-06-02 09:58:54

noamsml
New Member
Registered: 2005-05-03
Posts: 4

Re: in a section, choice of viewing articles by date or category

johnny_fx wrote:
<blockquote> Mary wrote:

<p>Question: what is your favourite kind of dark carbonated beverage?</p>

<ul>
	<li><a href="?soda=root-beer">A&amp;W Root Beer</a></li>
	<li><a href="?soda=coke">Coca-Cola</a></li>
	<li><a href="?soda=pepsi">Pepsi</a></li>
</ul>

<txp:chs_urlvar_default var="soda">

	<txp:chs_if_urlvar var="soda" value="root-beer">
		<p>Your answer: A&amp;W Root Beer Root Beer</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="coke">
		<p>Your answer: Coca-Cola</p>
	</txp:chs_if_urlvar>

	<txp:chs_if_urlvar var="soda" value="pepsi">
		<p>Your answer: Pepsi</p>
	</txp:chs_if_urlvar>

</txp:chs_urlvar_default>

Why this doesn’t work for me.

I always get this errors:

<code>
tag_error <txp:chs_urlvar_default var=“soda”> -> Notice: Undefined index: soda on line 8
tag_error <txp:chs_if_urlvar var=“soda” value=“root-beer”> -> Notice: Undefined index: soda on line 3
tag_error <txp:chs_if_urlvar var=“soda” value=“coke”> -> Notice: Undefined index: soda on line 3
tag_error <txp:chs_if_urlvar var=“soda” value=“pepsi”> -> Notice: Undefined index: soda on line 3
</code>
</blockquote>

First of all, it shouldn’t work, since chs_urlvar_default will only activate if the variable is not passed to the page. Thus, if the chs_if_urlvar tags are reached, you know that the value of “soda” is null. If you change chs_urlvar_default to chs_urlvar_exists it will work.

As for the debug messages, they can be solved too. I’ll look into them when I’m slightly more awake.

Offline

#20 2006-11-06 21:42:34

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 721
Website Mastodon

Re: in a section, choice of viewing articles by date or category

intensify.org/movies is an awesome idea btw 8-)


A hole turned upside down is a dome, when there’s also gravity.

Offline

Board footer

Powered by FluxBB