What is the difference between ‘title_permalink’ and ‘url_title_path’ variables? They seem to have similar behaviour.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
July 13, 2012 1:22pm
Subscribe [2]#1 / Jul 13, 2012 1:22pm
What is the difference between ‘title_permalink’ and ‘url_title_path’ variables? They seem to have similar behaviour.
#2 / Jul 17, 2012 10:40am
Hi MarkerMaker,
Thank you for posting your question here on the ExpressionEngine forums.
One uses a specific template, the other defaults to the site index. One uses the url title as a link while the other add the title for you, all you do is give it the template group and template.
From the docs…
title_permalink
This variable uses the “url title” as the link. It defaults to the site index with the “url title”
url_title_path
The URL to the specified template. The “url title” of the entry will be automatically added.
Cheers!
#3 / Jul 17, 2012 12:22pm
Thanks… Would you be able to give me real world example for when you would use both of these as I am still a little unclear?
#4 / Jul 18, 2012 12:04pm
Hey MarkerMaker,
Well actually, there’s no functional difference between the two. Looks like both have existed since ExpressionEngine 1, so let me check with the devs to see if there was a reason for having both variables.
#5 / Jul 18, 2012 5:30pm
Looks like one is simply a duplicate of another, added many years ago by an eager developer. We’ll need to deprecate one of the two, but since we have people using both on their sites, it’s a bit more of a process than it might look on the surface. My recommendation for you now is to pick whichever one makes the most sense to you and use that one consistently. How’s that sound?
#6 / Jul 19, 2012 8:31am
Wow so I really both the same in principle. How does this sit with Shane’s comments? He seemed to think they were quite different.
#7 / Jul 19, 2012 4:30pm
Hey MarkerMaker,
They did appear to be different upon first look, but when digging into the code we found out otherwise!
Sorry about the confusion!
Cheers,
#8 / Jul 20, 2012 7:38am
Thanks Shane.
#9 / Jul 20, 2012 3:49pm
Thanks to you MarkerMaker! We’d never have discovered this without you.
Have a good weekend!