This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

help with reference and identifier
#1

I am trying to call a variable to use to identify the pages

so if the article is pandemic depression the topic is  pandemic depression

calling a variable works fine in the code for the iframe code as shown

<script>
var commentics_config = {
'identifier': '<?php echo $topic ?>',
'reference': '<?php echo $topic ?>'
};
</script>




 but no for the php? code

$cmtx_identifier = '<?php echo $topic ?>' ;

$cmtx_reference = '<?php echo $topic ?>' ;


instead of showing the variable results the page topic shows the php echo statement

What is the proper syntax / code for the php code above to accept and display the variable content and not the php code?

thank you

-SB
Reply
#2

Just this:

PHP Code:
<?php 
$cmtx_identifier
= $topic;
$cmtx_reference = $topic;

You'll need to correct the reference in the admin area in Manage -> Pages by editing the page.

Have you completed the interview?
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by afoster
21-Aug-2020, 06:47 PM
Last Post by Steven
28-Aug-2013, 05:26 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)