I am creating a aui script in jsp page and it worked successfully but when I create a externally copy of that script and including it using liferay-portlet.xml it is not working
After adding External Script no events get Fired.
Can anyone help me on how to include external aui-script file ?
Any help would be appreciated.
Usually this problem occur due to the <portlet:namespace/> tag. In the external script you have to explicitly set the value of your portlet namespace.
Related
According to requirement of application, I have developed a custom web part in Kentico 9. This web part is using with same functionality at various places but we have to use with different layout structure.
As per my understanding, we can create custom layouts for a single web part from "Layout Tab" in web part configuration. As I used same things with various Kentio built in web part like Logon form, Logon-Mini form, etc.
But while trying to create new layout for my custom web part, I am getting web part loading error and when I checked into event log it is showing following error:
The file
'/CMSVirtualFiles/WebPartLayouts/=vg=87a868ce-926c-4cb3-a441-b4f1d4310afc/TDNForgottenPassword/ForgottenPassword.ascx.cs'
does not exist.
Here, internally system looking for ".CS" file under "CMSVirtualFiles" folder, which has actually under the "CMSWebParts" directory in which I have created my user control.
Is there any specific configuration required in custom web part to implement multiple layout of it? Please help me and guide me, what am I missing or doing wrong?
Check your webpart code file property in the ascx file. You need to specifically declare the full relative path to the .cs file and not just the filename. For example:
Correct
CodeFile="~/CMSWebParts/Community/GroupRegistration.ascx.cs"
Incorrect
CodeFile="GroupRegistration.ascx.cs"
Please make sure you don't have the store virtual files in the file system setting enabled.
I have created portlets for liferay and prepare couple of pages. Now I want to create installation script, which create pages definition in customer liferay server. I know that pages export/import is possible using LAR file, but this could be done only manualy, or using remote publishing which i am not able to do.
I was searching on net and found ddm tool. Which should be able to do that. Unfortunately i'm not able to get it work as it export only web content, blogs, wikis, etc, but not pages with portlets. It is probably because one of the condition is "Every Template must be assigned to a Structure. Don't create any templates on the Liferay server which does not have a structure connected to it.
". But how can I assign page to structure ? Cant find anything.
Or is there any other option for automatic page creation, which could be used ?
In case you created a custom theme, you can easily use the "resources importer" to create an entire site via the "sitemap.json" file (define pages: choose layout, assign portlets to the columns, ...). You can also export existing content as xml from the current instance and import them via the theme. Same thing for web content structures and templates.
for more details: https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-1/importing-resources-with-your-themes
Unfortunately theme is produced by another supplier, so this solution isn't suitable for me.
at the end i find working solution which consist of following steps:
create plugin hook
in hook setup upgrade process
in the upgrade process create pages with appropriate layout, friendlyUrl, etc. All these is possible to do using liferay api
Don't have enough reputation, so at least two links
https://www.liferay.com/de/web/james.falkner/blog/-/blogs/7cogs-is-dead-long-live-7cogs-
https://github.com/azzazzel/liferay-official-plugins/tree/master/hooks/sevencogs-hook/docroot/WEB-INF/src/com/liferay/sevencogs/hook/upgrade
How can I load javascript file on each page instead of adding it manually each item in Form Library. For example I want to always load jquery and a helper js file on any form.
Supported
The best you can do is have a button configured to show on the application ribbon or for all entities that includes the library as an action.
That way it will probably be loaded whenever you need it. It is only really of any use if you have a button you can attach it to though.
Unsupported
Inject the JS library into your pages using IIS
Maybey you can update edit.aspx once and include your script there.
I have created new aspx file within a module which I am going to use it as instead of newsbsite.aspx for create workspaces. I have deployed it and I can browse to it via my custom action link (site settings).
I have my own webtemplates.
What I want to do is using mynewsbsite.aspx to show only my webtemplates (not others) and implement permision inheritance and all other staff you can find in the original newsbsite.aspx. but I cann't.
is there anybody who can help me with this problem? thank you so much.
Use SPWeb.GetAvailableWebTemplates Method (UInt32) to get all the templates and filter out the out of the box ones.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spwebtemplate(v=office.12).aspx
I have created listview web part do display infopath form . When i open the forms using adminstrator login everything works fine but when i login using normal user account the fallowing error is displayed .
"Error: Access denid"
Can anyone give solution for this..
The user doesn't have rights to view the list the listview web part is reading from?
The only time I've had such errors is when a resource refferenced from a webpart (whether custom or not), is being read from the file system. e.g. DataFormWebPart reading an xslt from the file system (layouts folder) instead of the style library. I would just double check that you haven't got a file like an xslt being called from the file system. If you have, try storing it somewhere within SharePoint e.g. Style Library.