We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Referencing Disqus discussion from EE

How Do I?

david mantripp's avatar
david mantripp
55 posts
6 years ago
david mantripp's avatar david mantripp

Hi,

I’m in the process of (finally) dragging my EE2 site up to date. At present I’m close to a clean EE3 migration, but I’ve hit a hopefully minor roadblock in that I use Disqus for comments (I find casual visitors don’t want to create a login for my site so I stopped using EE comments module). I was using the cx_disqus add-on to sync EE comments with Disqus, but that is deprecated so I’ll have to use Disqus direct.

My question is this: to reference any particular discussion at Disqus, I need to provide the following:

this.page.url = PAGE_URL; // Replace PAGE_URL with your page’s canonical URL variable this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page’s unique identifier variable

for “this.page.identifier” I can use channel:entries:entry_id, but … I know I’m being stupid … I can’t find any variable in channel:entries which holds the URL (I assume Disqus wants the permalink path without the entry id)

Can anybody give me a clue ?

Thanks!

       
Kevin Cupp's avatar
Kevin Cupp
791 posts
6 years ago
Kevin Cupp's avatar Kevin Cupp

If you’re on at least 3.5.10, see if the {current_url} variable does what you need.

       
david mantripp's avatar
david mantripp
55 posts
6 years ago
david mantripp's avatar david mantripp

Thanks, it’s close, but I need the entry ID, not the entry title….

So, <site>/<channel>/<template>/<entry_id>

I’m sure I’ll find a way… 😊

       
Kevin Cupp's avatar
Kevin Cupp
791 posts
6 years ago
Kevin Cupp's avatar Kevin Cupp

Ah, your first post said Disqus needed it without the entry ID. See if the {entry_id_path} does what you need.

       
david mantripp's avatar
david mantripp
55 posts
6 years ago
david mantripp's avatar david mantripp

Yes, the Disqus docs are not very clear, it seems that “this.page.identifier” is a variable I can set if I need to. In their video it shows both this and “this.page.url” set to the absolute path of the URL hosting the discussion. Who knows.

I think {entry_id_path} doesn’t give me the template - it will give path/channel/id, not path/channel/article/id. That of course may well be a hole I’ve gotten myself into with over complex structuring, but I have 10 years of archives with that structure.

Anyway thanks for your help, I’m sure I’ll find a way, but unfortunately I need to step away and do some work I’m actually paid for right now 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.