Kentico 12 - unable to choose existing page template for new page of a particular type - kentico

What I have:
A custom page type called 'x'
A custom page template called 'Service'
A page of type 'x' whose page template is set to 'Service'
What I can't seem to do:
After creating a second page of page type 'x', (this page is a sibling of the first page) I go to change its template and try to find the 'Service' page template, but it is not listed in the 'Select page template' dialog.
Everything is checked in.
I haven't defined any scopes.
What could prevent my page template from being available in the 'select page template' dialog?
The 'Service' page template is also not listed when I modify the 'New page settings' > default page template of the 'x' page type
To clarify, here's the page template dialog of the first page I created:
and here is the page template dialog of the second page I created:
Why can't I find the template from the second page?

If you are using the portal engine development model, then you need to ensure each page template is added to the site otherwise it will not display in the page template selection dialogue when creating a page.
To check if a given the page template is added to the site:
Goto the Page Templates app
Select the page template in the tree listing
Select the Sites tab
Ensure the page template is added to the site

Related

.NET MAUI Dynamic Tab page

I am having issue to implement dynamic tab page in .NET MAUI project. Can we add tabs into Navigation page at runtime to open Webpage. I am trying to implement functionality model like Chrome or Edge to open web URLs in separate tab.
Can we add tabs into Navigation page at runtime to open Webpage
What does the webpage mean? At first, if you want to add a new tab into the TabbedPage when the user operates in the child page, you can use the the following code in the child page:
var tabbedpage = this.Parent as TabbedPage;
tabbedpage.Children.Add(new ChildPage());
And then if the ChildPage just have a webview in it and you want to add a new tab when the webview navigates to a new url. You can add a Navigating event to the webview and pass the url to the child page.
Update
You can create a construction method which has a parameter for the ChildPage, such as:
public ChildPage(string url)
{
//use the url here
}

Spfx extension Custom action component ids are specified by query parameters but matching manifests cannot be found

I have create spfx extension Application Customizer for top navigation and footer. Then run 'gulp serve' command in terminal, but can't see header and footer on page in browser. In console below error found
'Custom action component ids are specified by query parameters but matching manifests cannot be found. Ids: 0dc469d1-39bf-44a5-9cfd-fb7c0c7babbd'
Please help me in this.
Thank in advance

share point office 365 Get global navigation setting value in javascript file

We have developed an internal portal with multiple subsites using sharepoint office 365. We created our own page layouts/masterpage for the sites and most of the things like menu's, page body and page logos are customized(unique for all sites/subsites).
Each page has a header logo and a url assigned to that logo(logo describes site or subsite name). We have written a javascript file to load these logo and url and calling on the masterpage. Now the problem is these logo and link should load based on Global navigation
Example:
If the site is using the same navigation items as the parent site?
Yes - pull logo and link from site above
No - pull logo and link according to site name
if i get the GlobalNavigation setting value then i can do this in javscript file. Is there a way to get this GlobalNavigation setting value in javascipt file? I googled on this but didn't get enough information.
Thanks in advance,
Amarnath
--------UPDATED-------
I am using the below code but getting error "sp.runtime.js:2 Uncaught Error: The property or field 'Source' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested"
used code
var ctx = SP.ClientContext.get_current();
var web = ctx.get_web();
//Navigation Provider Settings for Current Web.
var webNavSettings = new SP.Publishing.Navigation.WebNavigationSettings(ctx, web);
//Global Navigation (Top Navigation Bar)
var navigation = webNavSettings.get_globalNavigation();
navigation.set_source(1);
webNavSettings.update();
ctx.executeQueryAsync(onSuccess, onFailure);

Logging in as a different user in sharepoint 2013

I want a link that the users can click which supports logging in as a different user and then redirects them back to the same page.The issue is the page currently the user is on is also a layouts page .So the below code will work but take the user to the home page not the layouts page they are currently on which is
http://test.net/_layouts/15/EditProfile.aspx
function ChangeLogin()
{
var url = window.location.host;
alert(url);
var loginurl ="http://" + url + '/_layouts/closeConnection.aspx?loginasanotheruser=true'
location.href = loginurl;
}
Thanks
Method 1:
This can be done if you have access to the 2013 server 15 hive. Open 15 hive --> Control Templates-->welcome.ascx . Add the below xml entry:
<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
MenuGroupId="100"
Sequence="100"
UseShortId="true"
/>
Note: This is a farm level change and will affect all web application and sites on that server.
Method 2:
In the page where you want to add the link to add below tag:
Sign in as diff user
LoginAsAnother() is the method used by SharePoint internally in the method 1(ie OOTB menu under logged in user name).
Here provide the server relative web url before '/_layouts/15/closeConnection.aspx'.

Need to have an aspx page with a Feature in SharePoint 2010

I have added a custom button to the server ribbon in SharePoint (I have used a feature with Farm scope, so that the button is visible throughout the various site collections).
For the elements of the feature, I have added a CustomUIExtension through which I want to load an aspx page on the click of the button.
<CommandUIHandler
Command="Test_Button"
CommandAction="javascript:
function demoCallback(dialogResult, returnValue)
{
SP.UI.Notify.addNotification('Operation Successful!');
SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
}
var options = {
url: '/_layouts/CustomPage.aspx',
tite: 'Custom Page',
dialogReturnValueCallback: demoCallback };
SP.UI.ModalDialog.showModalDialog(options);"
/>
I have added the CustomPage.aspx and its corresponding code behind class to the 14 hive (inside 14/TEMPLATE/LAYOUTS). However when I install the feature and click the button, I get an error saying "Cannot load CustomPage".
I understand that I haven't deployed the assembly, but shouldn't the aspx page be compiled Just In Time?
I guess your .aspx file is looking for the assembly (.dll) and not the .cs from which it is inheriting currently in the .aspx file.
Please put your assembly in the bin folder of your application and remove the inherits tage from your .aspx page

Resources