How to embedding variable in HTML with jbpm7 business Central? - jboss

How to embedding variable in HTML with jbpm7 business Central ?

Related

how do I prepend domain name for a hyperlink authored in rte?

I have an email template which has several authored hyperlinks using RTE editor.
For example:
<a href=\"/consumer/en-us/site-configurations/external-link/accounts.html
my java osgi service sends entire email template/page as an html to backend business layer which triggers the email.
how do I replace in osgi service <a href=\"/consumer/en-us/site-configurations/external-link/accounts.html to <a href=www.domain.com/consumer/en-us/site-configurations/external-link/accounts.html before email is triggered ?
following worked for me:
Run through a pattern matcher using regex and extract the relative link.
Pass it through externalizer.
ReplaceAll the relativeLink with new link received from externalizer
send the refined html back in business layer.
put the entire code in static synchronized method.

What is a component, template and page in AEM/CQ

Please give me an overview of what a component, page, page component and template is in AEM. How are they related to each other. Please give example if possible.
Suggest any site to start as a beginner.
Your are mixing up technical and non-technical terms a bit. So I try to explain it in two ways: From an abstract, non-technical level, and from a technical point of view.
Abstract, non-technical explanation
The content of your AEM project mostly contains pages. A page is tied to an URL like www.example.com/products/teddybear. When a user opens this page he sees the content of the page. An image of the teddy bear, some descriptive text but also the header and footer of your page. This is where components come in. Content like the image, the text, the header and footer are all different components on that page.
Pages are composed of components.
Technical explanation
When developers try to implement pages and components they will need to create page templates, page components and components.
Page templates are basically XML files that define a few things about the page. For example the title of the page (e.g. "Content Page", "News Page", etc.) that is shown in the page creation dialog, a description, allowed parent pages (templates), allowed child pages (templates) and paths in your content where this page template can be used. Besides those things you can also define the basic structure of the page. Add a parsys, already add components to this parsys so those components are "hard wired" into every page you create.
Page components are the "implementation" of page templates. Here you can add the HTML for that page.
Components are the building blocks of pages. A component usually contains a JSP or HTML file that contains the HTML markup and maybe some business logic for that component.
Obviously, there are a lot more things to consider. But this should give you a basic overview over the relationship between all of those things.
Links:
Page Template documentation AEM 6.2
Component documentation AEM 6.2

How to manipulate the meta area of the HTML dom with Scala-JS for a single page application

General Scala-JS page building advice needed. Most of the examples seem to be of the pattern where the main into which your single page application will go is between the tags in a landing page html file. How do you handle the need to insert something in the meta area of the dom? Do I need to render my landing page dynamically from the server to accomplish this? My specific need is to inject a script tag into the meta area of an already defined static html page. I'm using scalajs-react.
Generally you will want a server-rendered "root page" for the SPA. This allows you to dynamically compute proper cache busting file names for your script and stylesheet tags and to easily manage the cache expiration of the root page. Also, for proper html5 push state support you'll want to serve that page at every URL, which is easily done with a server side route.

What portions of the marketo code snippet can change?

My company is using marketo forms, and we are generating the page from a content management system.
We'd like to keep the contribution experience as simple as possible and prevent the user from contributing actual <script> tags.
The API documentation says they will give you a block of code that looks like this:
<script src="//app-sjqe.marketo.com/js/forms2/js/forms2.js"></script>
<form id="mktoForm_621"></form>
<script>MktoForms2.loadForm("//app-sjqe.marketo.com", "718-GIV-198", 621);</script>
My question is, what portions of this code are subject to change?
I am sure the 3 part hypen separated string and the integer being passed in can change.
What about the app-sjqe.marketo.com address?
The 3-part string is your Marketo instance ID, and shouldn't really change. The other integer is the form ID, which definitely will change depending on what form you want to embed.
The other thing that you may want to consider, is the other configurable options that you can send along with the form embed. For example, in the module that I have made for my CMS, I let the user put an optional 'thank-you' page URL, to redirect the form to after submission, and also a checkbox to optionally open the form in a lightbox on page load.
The simple module I made is for the Sitefinity CMS - happy to share code with you if that helps!

EPiServer 6 r2- Share content with another episerver site

I have two separate episerver websites with their own separate editors (separate CMS DBs). There is some common content that both websites should share. I want to maintain the common content on website1 and use it on website 2. I don't want to export/import.
Is there any way to share content in the above scenario?thanks
You can consider 3 approaches
1. Content Mirroring
Episerver provides content mirroring for sharing content.
Website1 would be the source site, and website2 would be the target site. Note that mirroring in CMS 6 requires Enterprise licenses.Here are some good resources on mirroring setup:
https://andersnordby.wordpress.com/2013/01/14/setting-up-mirroring-2-0-in-a-cms-6-r2-environment/
http://epiwiki.se/configuration/setting-up-mirroring-2-for-episerver-6
2. Expose Content as RSS
Exposing your content from website1 as an RSS feed and consuming the feed on website2.
This way, content would be maintained at website1, and website2 would just read the content - it would not be imported into website2.
http://world.episerver.com/FAQ/Items/What-is-RSS-and-how-does-it-work-in-EPiServer/
3. Custom Page Provider
Implementing a custom page provider to share content from website1 to website2.
This way, content would be maintained at website1, but the content would be shared to website2 and would appear in the page tree as if it was part of the site.
Custom page providers also require Enterprise lisences.
http://sdk.episerver.com/library/cms6/Developers%20Guide/Advanced%20Features/Page%20Providers/Page%20Providers.htm