ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

URL and ID Variable

February 12, 2011 1:26pm

Subscribe [2]
  • #1 / Feb 12, 2011 1:26pm

    heavymark

    66 posts

    I am including the Disqus Comment Javascript code into a snippet to be used on all pages.

    In the code it recommends entering a variable for the following two lines:

    // var disqus_identifier = 'unique_dynamic_id_1234';
        // var disqus_url = 'http://example.com/permalink-to-page.html';


    What variable should I replace “unique_dynamic_id_1234” with?

    What variable should I replace “http://example.com/permalink-to-page.html” with?

    I was hoping there would be a global variable for both but doesn’t seem to be the case. Now there are single variables for the channel entries tag but not sure how that would work since I wish to use on snippet for all channels and pages. Such as, would the below work for all channels and pages? Thanks in advance!

    {exp:channel:entries}
    var disqus_identifier = '{entry_id}';
    var disqus_url = '{permalink}';
    {/exp:channel:entries}

    Cheers,
    Christopher Beckwith

    [Mod Edit: Moved to the CodeShare Corner forum]

  • #2 / Jun 01, 2011 6:40am

    Fedor

    41 posts

    i’ve the same problem. i use expressionengine 1.7

    did you resolve it?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases