Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cot_url_modify #1242

Closed
esclkm opened this issue Sep 5, 2013 · 6 comments
Closed

cot_url_modify #1242

esclkm opened this issue Sep 5, 2013 · 6 comments

Comments

@esclkm
Copy link
Member

esclkm commented Sep 5, 2013

sometimes we need only modify link but not change at all.
Examples:
filters for users list or page list
polls
pagination of coments

I think we need function: cot_url_modify - which mixed Get params and function params

@trustmaster
Copy link
Member

Have a look at cot_url() source in functions.php. It uses $cot_url_appendix global, which might be what you are looking for.

@macik
Copy link
Member

macik commented Sep 6, 2013

@trustmaster is like a Jeff Dean: Even if you need some new functionallity is't already done in the core. :)

@macik
Copy link
Member

macik commented Sep 6, 2013

By the way, is it some simple way to get full current (requested) URL?
I know it can be like this:

$currentURL = $cfg['mainurl'].$_SERVER['REQUEST_URI'];

But it not simple, and it's difficult to use it in templates.

Wonder this possible with cot_url() without parameters. What you think?

@trustmaster
Copy link
Member

@macik What you're looking for is $sys['canonical_url'] or {PHP.sys.canonical_url}

@esclkm
Copy link
Member Author

esclkm commented Sep 6, 2013

I dislike constructions like this:
$a = $cot_url_appendix;
$cot_url_appendix = $x;
cot_url()
$cot_url_appendix = $a;

@trustmaster
Copy link
Member

Then $cot_url_appendix is not what you need. Its aim is to append some parameters to all URLs on the page (e.g. language).

Could you provide some examples of what you want to achieve? It is very hard to understand from the first post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants