Marketing tag not rendering content in Magnolia page - magnolia

According to documentation, Marketing Tag should render content on the associated page.
Here is what I try to do so far
In unsubscribe-form.yaml
title: unsubscribe-form
renderType: freemarker
visible: true
templateScript: /main/templates/pages/unsubscribe-form.ftl
areas:
header: # experimental
headerScripts:
type: noComponent
in unsubscribe-form.ftl
...
<head>
[#cms.area name="headerScripts" /]
</head>
<body>
...
</body>
in tag property dialog
When the page is rendered I don't see neither popup window nor meta tag in the header.
In server console I also don't see any exceptions.
What could be wrong?
PS. I also make sure that FTL templates are reloaded in magnolia by removing module's version in config and redeploy app.

I presume you ruled out the browser cache or any proxies in between you and the server.
Assuming you set up the headerScripts area as described in documentation, the most likely reason is that the modelClass doesn't exist or is configured incorrectly.

Related

Modify Css of Microsoft Qna Maker

So I have QnA maker set up and connected to our Azure (I am totally new to Azure). I need to change the CSS of the Iframe from QNA maker, it is currently blue (as the default). I am following this guide to make it our company's colors:
https://blog.botframework.com/2017/10/11/customize-web-chat-websites/
I need to be able to clone this: https://github.com/Microsoft/BotFramework-WebChat/tree/master/src (which I already forked) into the current Azure build, which I am ultimately having a problem with.
I am sure I am overlooking something simple in Azure, but I just need to clone the source code to properly add the .css files I need to be able to edit the bot.
Currently, I have tried to grab the Iframe and change the CSS that way, but no dice (of course). All I need to do is change blue, to red, any way to do that will be helpful, whether that is changing the Iframe after it loads or by getting this guide to work for us. Thank you!
Refer to the github readme for more detail: https://github.com/Microsoft/BotFramework-WebChat
There are options:
Easiest: In any website, IFRAME the standard Web Chat channel
Easy: In your non-React website, run Web Chat inline
Easyish: In any website, IFRAME your Web Chat instance
Medium: In your React website, incorporate the Web Chat React
component
According to your requirements; running the bot in an iframe with custom style, you should read the Easyish section:
You can isolate your instance of Web Chat by running it inside an
IFRAME. This involves creating two web pages:
Your Web Chat instance, as shown above. (refer to Easy)
The hosting page, adding <iframe src="/path/to/your/webchat/instance" height="height" width="width" />
Based on the Easyish section (step 1), you need to first complete the Easy section. In your existing web app, add a new page with the following code (enable directline on Azure Bot settings):
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
</head>
<body>
<div id="bot"/>
<script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
<script>
BotChat.App({
directLine: { secret: direct_line_secret },
user: { id: 'userid' },
bot: { id: 'botid' },
resize: 'detect'
}, document.getElementById("bot"));
</script>
</body>
</html>
CUSTOMIZE your chat box style by editing the botchat.css file. You make a copy from https://cdn.botframework.com/botframework-webchat/latest/botchat.css and edit to your liking and put your own customized botchat.css to somewhere in your web app and change the href in the header instead of using the default one.
Finally for Easyish section step 2, you can create an iframe (content is step 1 web chat page) and embed that in your hosting page.

Adobe AEM | Component is not being created in content folder

I'm trying to add a logo component inside a new component that I've created. The project was created using the eclipse aem plugin.
My component, that inherits from a native component.
My content component
<!DOCTYPE html>
<html>
<head>
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientLib.css # categories='paiva.all'}" data-sly-unwrap/>
<sly data-sly-include="/libs/cq/cloudserviceconfigs/components/servicelibs/servicelibs.jsp" data-sly-unwrap/>
<sly data-sly-include="/libs/wcm/core/components/init/init.jsp" data-sly-unwrap/>
<title>${currentPage.title || currentPage.name}</title>
</head>
<body>
<div class="page__logo" data-sly-resource="logo"></div>
</body>
</html>
My template
My template details
A page using the template
The error
Looking at the content folder I noticed that the component that I added in my component pagina.html does not exists at content folder. But when I add a component to the parsys, it does work.
If I add the component manually, it works.
Is that normal? If not, what should I do?
When you add a component using the UI, I suppose yo mean adding it to a paragraph system (parsys). When that happens a new resource of the appropriate resource type is added below the parsys resource.
In your case, you are statically including a resource which is missing. Sling then cannot render it.
The best solution is to add a 'logo' resource below the jcr:content resource in your template. That way the resource will be there when the page is initially created.
You could also force the resourceType of the resource when including it, then it would inject a synthetic resource. (but I would do the first option)

WSO2 Carbon: Re-Theming a single page

We have followed the guide provided by WSO2 to get access to the CSS / JSP pages.
Our aim is to re-theme / rebrand / restyle the login page. We have found that the login page is part of the jar: WSO2\repository\components\plugins\org.wso2.carbon.identity.sso.saml.ui_4.0.3.jar
The login page is called login_ajaxprocessor.jsp
The guide mentioned above states the following about JSP's ending with _ajaxprocessor.
By default when create a jsp file ( say “foo.jsp”) in a Carbon UI
component, it will inherit header, left menu and footer from the
Carbon core UI. But if the file name is “foo_ajaxprocessor.jsp”, there
will be no inheritance.
For an example let's consider, “login_ajaxprocessor.jsp” in
“org.wso2.carbon.identity.saml.sso.ui” component. It simply omit the
header, left menu and footer and display only the content from this
file. So we are able to customize this page in to a different look and
feel.
Were were successful in modifying the language (buttons, etc) in the JSP files. This Jar also contains a CSS file in: \web\sso-saml\css\main.css
We have modified this CSS file to my own style. However, when the page gets loaded, it seems the default WSO2 main.css file is read.
When looking at the default way in which the JSP page refers to the CSS, it says:
<link media="all" type="text/css" rel="stylesheet" href="carbon/sso-saml/css/main.css"/>
We would expect that the /sso-saml/ part wordt select our own modified CSS file.
Is it possible to configure that for this page only, our modified CSS file will be used? We want to prevent to have to change the default main.css. Also, it is because we want to use specific images, that we want to store in jar\web\sso-saml\images
Yes you can use your custom style pages and apply them. Please refer [1] [2] for more info. This will guide you on your task.
Hope this will help you.
[1] http://wso2.com/library/knowledge-base/2010/11/customize-ui-theming-wso2-carbon-based-products
[2] http://wso2.com/library/knowledge-base/2011/11/playing-around-carbon-product-themes
The login.jsp can be found in following jar.
/repository/components/plugins/org.wso2.carbon.ui_4.0.5.jar => /repository/components/plugins/login.jsp
and css => /repository/components/plugins

How to change the viewport settings through Adobe CQ?

I am working on a site using Adobe CQ and somewhere CQ is automatically adding:
<meta name="viewport" content="width=device-width,initial-scale=1">
right after the opening head tag. Does anyone know where I can change this is in Adobe CQ so I can get this site displaying correctly for the iPad? Maybe there is a way to override any other viewport settings found on a page? Thanks for any suggestions.
The default head script for the mobile page in CQ5.5 can be found at libs/wcm/mobile/components/page/head.jsp
The default head script for the web page in CQ5.5 can be found at /libs/foundation/components/page/head.jsp
You can override the foundation head.jsp by creating a resource using this path: /apps/<site-id>/components/page/base/head.jsp. Any content in this resource will override content in default(libs/) head.jsp.
Actually it is added via js in /libs/cq/touch/widgets/source/jquerymobile/jquery.mobile.js, search for metaViewportContent string.
I haven't found yet how to change it in proper way, though.

How to acquire request parameter from url from Oracle Porta HTML Page Skin?

I hope any of Oracle Portal experts here could help me out regarding this question.
I have a portal template/page that is using a HTML Page Skin. The skin may looks like:
<html>
<head>
<title>#TITLE#</title>
</head>
<body>
#BODY#
</body>
</html>
By using Oracle Portal, I could add portlets (PL/SQL and Java portlet) to the body section, in its respective template/page. However there is no way that I am aware of that could enable me to add portlets to other section in the HTML Skin, eg in section.
I need to dynamically change the title with some value that I get from the page URL and query string.
eg. if the page's url is http://www.example.com/portal/page/portal/examplepagegroup/page1?param1=paramvalue
so that the title will be 'param1', and it should be done without javascript technique.
How could I get the request parameter param1 from the URL so that it will be available to the head section? I am thinking of PL/SQL code to be used here, but, I do not how to access query string of current page.
Please comment here if clarification to the question is needed. Thanks.
The page title is a static attribute of the Portal page. There is no supported way for a portlet to change the page title dynamically at runtime. The rendering engine combines the HTML from each portlet with some HTML it builds itself, and the title is part of what the renderer builds.
What is possible is to dynamically build pages with specific names by calling WWSBR_API.ADD_FOLDER (a folder is the same as a page). See So your portlet could build a page and then redirect to it.
You find the Portal 10.1.4 API at http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/index.html

Resources