I would like to add in the top right of every page - contact phone & email link.
They are styled uniquely on the page by CSS - based on their containing DIV's class.
What is the best practice way to make that visible on every page - and editable in the CMS?
Would I have to have the HTML markup editable too (the client is non technical)?
Thanks.
You want to add a HTML widget on the default layer. You can give it custom classes etc. and style it within your theme.
Related
I'm building a site in Kentico 12 MVC and working on setting up content personalization. The normal way to do this is to add an editable area in the view:
<div>
#Html.Kentico().EditableArea("area1")
</div>
Then, in the CMS, the Page tab will show an empty area where the user can add a widget with personalized content.
The problem is that the content I want to personalize is located in my site's login box, which is a common element on every page, so I'd need to manually add a widget into the editable area on every page individually. But my site has over 300 pages, so that's totally impractical.
Is there a way from within my view model that I could check if the editable area has any widgets, and if it doesn't, output default content instead? I'm trying to see if there's an API method or something that would let me count the number of widgets inside an editable area, but I can't find anything in the documentation.
I guess you need to check with regex if Editable area html contains widget tag "<object type="widget" >"
I am using 1-2 Columns (70-30) layout for the page in liferay. The problem that I am facing is that I am not able to place them properly in 1-2 columns form even after dragging them properly on the page. I am making use of web content portlets. The portlet that should be placed on '30' side;its data appears the way I want on the RHS but the portlet window covers the entire screen. How should I place the portlets to get the exact 1-2 columns layout?
EDIT:
Is it possible to place a portlet over another portlet?
If the portlets that you are trying to place are custom portlets, It may be worth checking if custom css width property forcing portlet to occupy more width than supposed.
You can't place one portlet over another portlet. But "Nested Portlet" can be used to include more than one portlet in their own layout.
As you don't have public URL, I can only suggest steps to debug your issue.
Login to portal as Administrator.
Create a new page.
Apply liferay default classic theme to the page and apply 70-30 layout.
Add one Web content display portlet instance in column 1 and another in column 2.
Checkpoint: Enable Edit checkbox and see if the default portlet boundaries are occupying width they are supposed to take. If yes, then your liferay default working fine.
Checkpoint: Select your web content article and see if width of display changes. If Yes, then the problem is with with your web content article.
Checkpoint: Apply your theme and then see the issue. Then issue may be with your custom css files in _diff folder.
Use Firebug in Firefox or chrome dom viewer (F12 in chrome window) and observe which CSS style is causing the issue.
We are using liferay 6.1
On Public page we want to display web-content in one portlet, but it should not be only selected one.
we want to display it randomly on page refresh. Like on page refresh it should display different web content from group of web content.
Any hint ?
Thanks.
Consider to use structures & templates: With structures you give some contents of an article - this might be alternative content, or just a description of a filter that you want to display.
A simple structure (that contains all of the content in just one article, not exactly what you ask for) just has repeatable HTML text fields. Edit all of them with the content you want to show alternating.
In your template you read an article with this content, generate a random number and only show the fragment from the content that the random number suggests.
Another way is to have a template that queries Liferay's API for several articles. Then you randomly select one of them and display it.
Templates can be written in Velocity, Freemarker or XSL. The nice thing is they're completely runtime-configurable.
Liferay Blogs, particularly those of James Falkner, have a few articles on how to work with the API from templates.
You can customized the "Web Content Display" portlet with a hook.
Add to config-page the "show randomized" checkbox, get the list of existing journal articles and choose random one of them.
I am currently working on an Orchard module. This module contains an MVC application including the views. I would like to make the module as configurable as possible. One of the items that I would like the customer to configure is the way the MVC views from the module look. Part of it will be determined by the theme. But not everything. Consider the following scenario:
The module contains a view for placing an order. The view displays a form in ´normal view way´. That is field labels and input labels. But at the head of the form each customer must be able to define his own set of instructions to display. Or maybe the customer wants to put there a message for pointing the customer to some other actions.
In the most ideal way I would have a content page where the customer can put all kind of content and one specific block that is the result of the view of the module. Kind like a web part. I can´t find out if it is possible and how that is achieved.
Edit for clarification
Module creates a page like this:
TITLE
FORM
So both title and form are outputted by the module controller.
I have managed to create a layer with the condition that the url matches the page with my form.
I have added a HTML widget to this layer in the content zone with position 1 (tried 0 to).
However the pages looks like this:
TITLE
FORM
WIDGET
instead of
WIDGET
TITLE
FORM
Returning a ShapeResult from your controller action will ensure that your view is themed and benefits from widgets, which are your "kind like a web part" thingies in Orchard.
I am using the XPages Extension Library mobile controls to create a mobile web interface for an existing Notes app.
When displaying a document with a large number of fields I would like to use an accordion type UI so that parts of the page can be expanded or collapsed to show or hide the fields in each pane (similar to sections in a traditional Notes client app).
Having looked at the "Accordion Outline" in the Ext Lib demo app I started to build the page using the Outline control. Within each entry (node) of the Outline I, ideally, want to place a rounded list and then put my fields & controls inside that.
But it looks like the nodes in the Outline can't contain this type of content - unless I'm missing something?
Any suggestions as to which controls I can use this type of UI?
Thanks
You can any time use an xp:panel and assign it the dijit.accordeon (look up the exact name please) dojo type. Then you can put anything inside including repeat controls etc. I would guess it might make sense to build your own CC to hold the content for each accordeon panel