Is it possible to set a default webcontent template in liferay? - templates

maybe you can help me.
I use verison 6.1.1 ce of liferay.
I have installed the "default-web-content-hook" from plugin-repo.
I want to set a default template for the webcontent display portlet, so that when a user clicks "Add Web Content" and the editor opens up, a certain preconfigured template, like "carousel" from the default-web-content-hook.
Anyone found out how it works?
Thanks guys, you're the best!
Have a nice weekend!

I think that there is no such option in Liferay which would set the default structure (template).
But it could be achieved in several ways.
You could just edit the link which opens the add web content dialog and append the structureId param with appropriate value.(&_15_structureId=MULTIPLE-ITEM-CAROUSEL)
Other option would be modify /portal-web/docroot/html/portlet/journal/edit_article.jsp and when the structureId param is null insert there a value. This value could be hard coded or supplied via configuration.
Also you could modify com.liferay.portlet.journal.action.EditArticleAction.

Related

Sitecore add here button not showing the Add rendering dialog

All of a sudden the Add here button in experience editor to add a rendering is not working. When clicked nothing happens. Do you have any idea where can I start look into? I already tried to remove the custom styles and scripts in my Editing theme. Sitecore version is 9 update 2 and SXA is 1.7
You have started from the right thing. Please make sure that you have the valid base themes defined in the Media Library: /sitecore/Media Library/Base Themes, especially, the Editing Theme with the logic used to edit components in Experience Editor.
Another idea is to check the order in which the layers load in Sitecore. The default order is defined in Website/App_Config/layers.config, make sure that SXA configuration loads last in the Modules layer, so that all custom modules are processed ahead of the SXA. It is recommended to create a custom patch file instead of modifying the standard configuration.
Hope this helps.
Did you check the console?
Maybe you have some error caused by some new custom script and that's preventing the add button to work
We had this issue for a specific set of placeholders, fortunately affecting only a single project in our solution. To fix the behavior, we had to manually set "editable" to false -> save item and then back to true -> save item for every affected placeholder.
[EDIT]
We finally found the culprit, it was related to a Sitecore bug documented here: https://kb.sitecore.net/articles/706490
Setting the value for Query.MaxSize from 100 to 400 permanently fixed the issue

SharePoint 2013: Using StratusForms I deleted "NewForm.aspx", now only the new "NewForm" will not work

Tools: SharePoint 2013, SharePoint 2013 Designer, StratusForms
What I was doing: StratusForms - Modify SharePoint's Default Forms with HTML Templates (https://www.youtube.com/watch?v=oai-m_KyzMc)
Status: DispForm and EditForm currently work, NewForm did work until the incident.
Incident: I deleted the main webpart on NewForm and the form was hosed, so I deleted NewForm.aspx. I recreated the NewForm.aspx and also added it to forms library (https://sharepoint.stackexchange.com/questions/108467/accidentally-deleted-default-editform-aspx). Like before when it worked, I added a Content Editor webpart and pointed it to my StratusForms template, but it did not work . The controls/boxes did not show up. It worked before on the old NewForm, and it currently works on DispForm & EditForm.
Question: Given the above information does anyone know why, or better yet have a solution, to get NewForm.aspx working with StratusForms again?
Thank You!
So the underlying issue was SharePoints internal linkage of it's 3 forms (DispForm, EditForm, NewForm) to the data sources.
So those out-of-the-box forms are not like the ones we create. Even though you create a new "NewForm" and it may look like the old default NewForm, but it is not. There is metadata like Microsoft.SharePoint.PAGETYPE, which tells if it is a custom form or new, display, or edit form.
The resolution was found in this article (http://www.sharepointblogs.be/blogs/vandest/archive/2011/03/11/troubleshooting-issues-with-dispform-editform-and-newform.aspx).
In case the link breaks I have also included the manual method here:
Manually
It's easiest if you take a corresponding form from another SharePoint List in the site and export it (SharePoint Designer) or just copy it to a text editor. This way, most of the settings of the List Form Web Part are already correct
Generate a new GUID and fill that in for the __WebPartId [uppercase & just change a few chars/numbers] and properties [lowercase, same as WebPartID & has a g_ prefix] of the List Form Web Part markup. It has to be the same GUID but the formatting is different. See the above screens for samples
Update the property with the List ID you're targeting
Verify all other properties of the List Form Web Part and save the file as either DispForm.aspx, EditForm.aspx or NewForm.aspx
Import (SharePoint Designer) the page (or paste contents from the text editor)

Joomla 3.8 switching templates/styles?

Okay, so I understand that you can set a template/style in a menu item which I understand. However.. What would you do in this situation..
The website uses two different templates/styles depending on what section of the website they are in.
What if you are in section 1 of the website and need to go to section 2 that uses a different style? And this action is controlled by a controller on if a condition is met.
I've managed to do this so far using $app->redirect and including the Menu Id so that joomla picks up the correct template/style to use. However this just seems wrong, as I can't determine the Menu Id once the component is installed elsewhere...
Doing the getView() approach to show a certain view seems like the correct procedure, however it doesn't allow me to change the template/style and will use the template/style from the original menu item.
Is there another method I don't know about? Does Joomla simply not have something in place for this? It's almost as if I need to change getView to accept a template/style parameter
They changed the name Template/Style to theme.
JFactory::getApplication()->set('theme', 'my_system');

Umbraco change page template dynamically

I am using Umbraco 7.5.8. I would like for a page to switch to another template if the browser being used is certain versions of internet explorer. I wasn't sure how to do this or if it could be done.
It seems that adding the altTemplate parameter to the URL, e.g:
my-domain.com/my-page?altTemplate=newTemplateName
works right out of the box (just make sure to add the new template to the document type's "Allowed Templates" in Umbraco). Combined with Mario's suggestion to use JavaScript, this should do it.

No results message using display templates

I have a sharepoint 2013 site with a page that uses the CSWP and a custom display template. When there are no results, I want to display a message that says "Share What's Going On". I tried setting the $noResults variable in the display template, but nothing displays. When I set a breakpoint on that same line, the browser doesn't break.
How do I display a "no results" message?
Thanks
Jim
You'll need to set the EmptyMessage web part property value. The property is hidden so you'll have to set it programmatically or by exporting the web part and editing the .webpart file.
Think this link have your answer:
Link for changing $noResults