Forums / Cotonti / Support / Current URL Tag

Hodges
#1 2013-03-27 11:48

Hi,

Does there exist a global tag that outputs the current URL / URL of the loaded site location?

Moreover, is there a list of all the global tags (not the header/footer tags, but things like {PHP.cfg.mainurl})? Also I think the TPL Tag Repo is missing a few tags (e.g. {PAGE_SHORTTITLE} in modules/page.tpl) and could use some attention.

Thanks,
Hodges

Trustmaster
#2 2013-03-27 14:26

I think the easiest way to output the current URL is using {PHP.out.canonical_uri}.

For the list of global vars, have a look at the Global variables reference.

Some tags are missing in TPL Tags Repo because those tags are not hardcoded anymore and are generated on the fly in different locations with various prefixes, e.g. {PAGE_SHORTTITLE} is also seen as {PAGE_ROW_SHORTTITLE}, {SOME_PLUGIN_PAGE_ROW_SHORTTITLE}, etc. TPL Tags just can't handle them correctly.

The best way to see the list of all available tags in current template is using CoTemplate debug mode.

May the Source be with you!
Hodges
#3 2013-03-27 15:25

Ah thank you. I wanted to be able to grab the current URL as I was being limited by the current category breadcrumbs and wanted to make my own.

All useful information thanks. That last link is especially useful as so many tags have changed going from Genoa to Siena.