Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-05 17:19:51

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

return the url for the current page?

hello, I’m using a url scheme of the kind site/section/articl_url (which under categories would be: site/category/category-name) and I need to return the current url inside a js script to set a cookie.
I did this:

<txp:site_url /><txp:if_section name="about,content,extra"><txp:section />/ </txp:if_section><txp:if_category>category/<txp:category link="0" title="0" this_section="0" /></txp:if_category><txp:if_individual_article><txp:nfe_url_title /></txp:if_individual_article>

but it breaks my code inserting somewhere a \n (new line) inside the js.

help?!


what was that again…?

Offline

#2 2007-07-05 17:44:18

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

Re: return the url for the current page?

I don’t know if this is related to your problem, but… what is this tag <txp:nfe_url_title />?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2007-07-05 18:01:58

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

Re: return the url for the current page?

it’s a piece of php that returns the url_title for the article.
it’s like this:

function nfe_url_title($atts)
{

	global $thisarticle;

return $thisarticle['url_title'];
}

what was that again…?

Offline

#4 2007-07-05 18:12:01

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

Re: return the url for the current page?

If you are already using 4.0.5, there is a new tag <txp:article_url_title />.
Of course, this seems to have nothing to do with your problem. (Sorry for disturbing).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2007-07-05 18:16:45

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

Re: return the url for the current page?

that’s good to know, anyway!
unfortunately i’m using 4.0.4, is there a list of the new tags in 4.0.5?
thank you


what was that again…?

Offline

#6 2007-07-05 18:25:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: return the url for the current page?

There are only 2 new tags

  • <txp:article_url_title />
  • <txp:hide />

but a lot more improvements

Last edited by colak (2007-07-05 18:26:11)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB