This content has been marked as final. Show 7 replies
maybe too obvious here, but are you storing it in a variable on printing it to the screen?
LOL - maybe obvious to you, but I'm so green at this! ;-)
My plan is to create a Region Template with the html embed code from facebook - I'm assuming that means I would be printing it to the screen. However, I'll take any info you can offer (how I actually end up using it might change in the end).
looks like you have the siteId and nodeId around the wrong way.
That's great - thanks! :-)
That seems to work fine on primary pages, but secondary pages still points back to the primary page - is there something that will work regardless what page it's on?
How would I include the path of the server. For example, if the page I'm on is:
how would I generate the whole path including the server?
Edited by: Trevor B on Aug 18, 2010 7:20 AM
Oh....well in that case you will need to do something like this:
http://[!--$SERVER_NAME--]/[!--$ssGetServerRelativeUrl(siteId,nodeId)--][!--$if isSecondaryPage eq 1--][!--$region1--][!--$endif--]
region1 would be the region for the main content, you may have renamed it to something else.
There is another way to do this which I think would be easier, if you append ?IsJava=1 to the end of the URL you will see a page that will display the local data properties.
One of the variables you want to look for is *'siteRelativeUrl'* if you use this there will be no need to check if the page you are on is a secondary page.
It would look something like this:
Outstanding! Thank you! :-)
ssGetServerRelativeUrl() will include the primary page file name, if assigned. Don't use it for building paths to secondary pages because you will get this:
Use this one instead, it omits the file name:
Also, you can simply return the current URL without having to recalculate it. Use this: