<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Ajax pages, lists, etc</title>
		<link>https://www.cotonti.com</link>
		<description>Laatste forum onderwerpen</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 02 May 2026 09:02:08 -0000</pubDate>

		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	Oh, sorry, COT_AJAX is a constant and it is always predefined in common.php line 190:</p>
<pre class="brush:php;">
define('COT_AJAX', !empty($_SERVER['HTTP_X_REQUESTED_WITH']) || !empty($_SERVER['X-Requested-With']) || $_GET['_ajax'] == 1);</pre>
<p>
	So changing it doesn't really work. Instead, you have a few options:</p>
<ul><li>
		Request a page via XHR (AJAX).</li>
	<li>
		Pass _ajax=1 in the URL.</li>
	<li>
		Hack index.php and put $_GET['_ajax'] = 1 at the top of it.</li>
</ul>]]></description>
			<pubDate>Ma, 10 Dec 2012 14:29:05 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7262&d=0#post36496]]></link>
		</item>
		<item>
			<title>tensh</title>
			<description><![CDATA[<p>
	Hmm, I made a test plugin like this:</p>
<pre class="brush:php;">
&lt;?php

/* ====================
[BEGIN_COT_EXT]
Hooks=global
[END_COT_EXT]
==================== */

 
defined('COT_CODE') or die('Wrong URL');

define('COT_AJAX', true);

?&gt;</pre>
<p>
	... yet it still displays the header and footer everywhere. I purged the cache. What am I doing wrong? How to tell Cotonti that something is requested via ajax?</p>
]]></description>
			<pubDate>Ma, 10 Dec 2012 12:19:54 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7262&d=0#post36494]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	It is absolutely global.</p>
]]></description>
			<pubDate>Ma, 10 Dec 2012 12:13:14 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7262&d=0#post36492]]></link>
		</item>
		<item>
			<title>tensh</title>
			<description><![CDATA[<p>
	Thank you :)</p>
<p>
	Is it only for pages, or can this be set globally for any pages, plugins, modules??</p>
]]></description>
			<pubDate>Ma, 10 Dec 2012 11:47:08 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7262&d=0#post36491]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	View module can only display plain output of .txt and .html files.</p>
<p>
	What you need is AJAX mode. When a page is requested via AJAX, the constant is defined:</p>
<pre class="brush:php;">
define('COT_AJAX', true);</pre>
<p>
	and header/footer are not printed.</p>
]]></description>
			<pubDate>Ma, 10 Dec 2012 11:05:13 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7262&d=0#post36490]]></link>
		</item>
		<item>
			<title>tensh</title>
			<description><![CDATA[<p>
	Hello;</p>
<p>
	I'm currently developing a mobile theme for Cotonti using jQuery mobile. For flawless functioning, it requires linking to pages without header and footer (content delivered by ajax).</p>
<p>
	I remember there was once a view module, did it support displaying Cotonti content like this? </p>
<p>
	Is there a ready-to-go solution or will I have to write some kind of plugin for this?</p>
<p>
	When I'll be ready, I'll publish the theme with some plugins if there will be any needed.</p>
]]></description>
			<pubDate>Ma, 10 Dec 2012 10:03:34 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7262&d=0#post36487]]></link>
		</item>
	</channel>
</rss>