![]() |
![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]() Is there a variable that will output the current url (for product pages) available within Interspire?
__________________
Sports Warehouse |
#2
|
|||
|
|||
![]() As far as I know there isn't one available in Interspire by default.
If you're comfortable with php you could write code to get it that way. I usually use this function to get the current page's URL. PHP Code:
PHP Code:
Cheers, Keith |
#3
|
|||
|
|||
![]() As far as I know Interspire don't have a current page variable set by default.
If you're comfortable with PHP you could add some code to get it. I usually use the following:- PHP Code:
PHP Code:
Cheers, Keith |
#4
|
|||
|
|||
![]() Thanks. The only thing is that within Panels etc, entering PHP code doesn't seem to work. For example, I have a Panel where I'd like to enter the following code:
<div class="fb-comments" data-href="<?php echo curPageURL(); ?>" data-num-posts="2" data-width="580"></div> (this is a code that will insert a Facebook comments plugin, but it needs the page URL to work properly) but the above code doesn't work because the Panel file is a .html file. Anyone have any ideas on any %%GLOBAL_%% variable or anything that could be added in to insert the page URL? Cheers Graeme |
#5
|
|||
|
|||
![]() Actually I think I may have solved it. I think:
<script language="javascript" type="text/javascript"> document.write("<div class='fb-comments' data-href='"+location.href+"' data-num-posts='2' data-width='580'></div>");</script> does the trick |
![]() |
Thread Tools | |
Display Modes | |
|
|