Getting page title in page layout
-
10-12-2019 - |
Question
I am using the following code to get page title of current page in Page Layout but it is not working.
<asp:Literal runat="server" text="<%$SPContext.Current.Item['Title']%>"></asp:Literal>
How to get page title in page layout?
Solution
Working on the client, no matter how mysteriously the HTML page's title was originally composed (if that's what you want):
<html>
...
The title of the document is:
<script type="text/javascript">
document.write(document.title);
</script>
...
</html>
OTHER TIPS
What you need us the SharePointWebControl:TextField
or SharePointWebControl:FieldProperty
control.
Waldek has written a blog about it here: http://blog.mastykarz.nl/showing-names-site-columns-page-layout/#
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange