Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-30 08:50:08

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

txp:site_url requests page each time?

hello,

I have this block of code in my page:

<a id="home" href="<txp:site_url />" title="back to homepage">
<span class="arr"></span>
home</a>

<a id="projects" href="<txp:site_url />projects?c=illustration&p=1" title="">projects
<span class="arr"></span>
<img src="" />
</a>


<a id="about"<txp:if_section name="projects">class="low"</txp:if_section> href="<txp:site_url />about" title="">about
<span class="arr"></span>
<img src="" />
</a>

<a id="contact"<txp:if_section name="projects">class="low"</txp:if_section> href="<txp:site_url />contact" title="">contact
<span class="arr"></span>
<img src="" />
</a>

which is apparently requesting the page address each time a site_url tag is called.
is that normal..?

thank you


what was that again…?

Offline

#2 2008-07-30 09:07:52

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: txp:site_url requests page each time?

No, that’s not normal, especially if you see what happens when you use the site_url tag:

	function site_url()
	{
		return hu;
	}

It doesn’t get more simple than that. No request at all, it just returns a predefined constant value.

Offline

#3 2008-07-30 13:38:27

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: txp:site_url requests page each time?

forget about the above, I guess I need to learn how to read firebug’s reports.

thank you anyway


what was that again…?

Offline

#4 2008-07-30 14:38:43

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: txp:site_url requests page each time?

mmm… how would you use if_individual_article inside <txp:php>?


what was that again…?

Offline

Board footer

Powered by FluxBB