How can I get page current url using declarative syntax

%3CLINGO-SUB%20id%3D%22lingo-sub-725030%22%20slang%3D%22en-US%22%3EHow%20can%20I%20get%20page%20current%20url%20using%20declarative%20syntax%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-725030%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20new%20to%20Sharepoint%20actually%20I'm%20front%20end%20developer%2C%20I'm%20trying%20to%20get%20the%20current%20URL%20of%20the%20page%20using%20declarative%20syntax%2C%20I%20used%20the%20following%20code%3A%3C%2FP%3E%3CPRE%3E%26lt%3BSharepoint%3AListItemProperty%20Property%3D%22FileRef%22%20runat%3D%22server%22%20%2F%26gt%3B%3C%2FPRE%3E%3CP%3EIt%20works%20but%20just%20if%20I%20have%20the%20page%20check%20out%2C%20as%20soon%20as%20I%20publish%20the%20page%2C%20it%20doesn't%20return%20nothing.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20know%20if%20there%20is%20a%20way%20to%20get%20the%20URL%20using%20a%20similar%20syntax.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-725030%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeclarative%20Syntax%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-742346%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20page%20current%20url%20using%20declarative%20syntax%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-742346%22%20slang%3D%22en-US%22%3E%3CP%3EJust%20in%20case%20someone%20has%20the%20same%20problem%20I%20solved%20with%20the%20following%20control%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C!--MS%3A%3CPageFieldFieldValue%3AFieldValue%20FieldName%3D%26quot%3B105f76ce-724a-4bba-aece-f81f2fce58f5%26quot%3B%20runat%3D%26quot%3Bserver%26quot%3B%3E--%3E%3C!--ME%3A%3C%2FPageFieldFieldValue%3AFieldValue%3E--%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi, 

 

I'm new to Sharepoint actually I'm front end developer, I'm trying to get the current URL of the page using declarative syntax, I used the following code:

<Sharepoint:ListItemProperty Property="FileRef" runat="server" />

It works but just if I have the page check out, as soon as I publish the page, it doesn't return nothing.

 

I want to know if there is a way to get the URL using a similar syntax.

1 Reply
Highlighted

Just in case someone has the same problem I solved with the following control:

 

<!--MS:<PageFieldFieldValue:FieldValue FieldName="105f76ce-724a-4bba-aece-f81f2fce58f5" runat="server">--><!--ME:</PageFieldFieldValue:FieldValue>-->