solved Get the current url

alt=
@andrusito
9 years ago
302 posts
Hi there,

Which is the best way to get the current url the user is watching? I want to include a Whatsapp button but I need this url to complete the code. Look at the attached picture.

Where "$title" is the actual page title and "$link" is the actual url..

Is it possible to get those details?

Thanks-
updated by @andrusito: 07/04/15 02:09:52AM
paul
@paul
9 years ago
4,326 posts
Put a {debug} in the template to see what smarty variables you have to play with. I think the actual URL is there somewhere, but failing that, it can likely be built using the $_post array variables.
hth


--
Paul Asher - JR Developer and System Import Specialist
alt=
@andrusito
9 years ago
302 posts
Great! Thanks Paul. These are the variables I was looking for:

For title: {$page_title}
For url: {$current_url}

If anyone need it, there u have.

Tags