RTF Template Common Header/Footer - enterprise-architect

By working with multiple user templates in the project, I created a master document to aggregate some model document with the wanted packages inside (requirements, use cases, etc).
During some common changes to the templates, I find it very frustrating to edit header and footer one by one template file.
Is there not a way to define a header/footer stylesheet to apply to all or certain user templates?

Yes, you can define header and footer in either the cover page template, or the table of contents template.
This header/footer will then be used by all subsequent templates.
The only caveat is that all subsequent templates will override the header/footer if they define one for themselves, even if the header/footer is empty.
And since there is no way to get rid of a header, in a template, you'll have to create a new template and copy the contents of the original template into the new template.

Related

How to make a book using Jekyll on github.io

I have about 1000 regular static html pages in the GitHub repository (book). I regularly edit these pages using a special program. Each page contains only content; no header, footer or table of contents.
I want to use Jekyll to host them on Github Pages so that each page has a header, footer and a navigation block - a tree-like table of contents on the left side of browser. The table of contents is also a prepared static html file, common for the entire book.
The easiest way is to use frames, but this is not considered the best option.
I want the result to be something like https://rust-lang-nursery.github.io/rust-cookbook/
I have scanned github (search all repositories for _config.yml file) but have not found any similar use of Jekyll.
Can I do something like this using Jekyll?
This is an ideal use-case for a static site generator like Jekyll:
You might need to convert your content to Markdown or clean them up depending on the HTML
Each page has a common layout with the header, footer and navigation
You can make a separate page for table of contents by iterating over your pages inside a separate template
There's not really a concise answer here, short of learning more of Jekyll's feature set to become familiar with the concepts referenced above:
https://jekyllrb.com/docs/
https://cloudcannon.com/community/learn/jekyll-101/
Here's a template with a live demo that is made for hosting a book. You could use this as a starting point: https://github.com/CloudCannon/author-jekyll-template

How to combine authorable css files in css.txt in aem

We have an existing AEM application where there are 100s of pages. On most of the pages, different css files are getting loaded via a separate network call. We need to optimize this. What I am thinking is if we can:
1. Author the list of css files on the page as a page property.
2. In our code, this page property is read and all the css files mentioned as a property value get combined and rendered on the page. Similar to what is done in css.txt file or embed property.
Please suggest.
Their are few ways to reduce the network calls for css files in AEM
1) Add the css files at the template level so that all the css files are loaded once.
2) Instead of adding the category of the clientlibs use the embed property of the clientlibs. AEM will combine all the clientlibs provided in the embed property into a single clientlib and their will be only network call. But the size of the css file may increase after combining and it will effect the page load time for the first time.
But if your requirement is to author the css files then I will suggest you have a dropdown kind of property in your dialog where all your css files are displayed and the author can select the css according to the need. Once selected then you can apply those css to the html by reading through sightly.
So, it seems you don't want to or cannot use the clientlib functioanlity which is an ootb AEM feature.
No matter what solution you choose - maybe a frontend JavaScript snippet that can decide which CSS files would be needed, or some logic that builds CSS includes at render time based on the components used in the page, or something completely different - I would strongly suggest not to put the CSS files to be used in the editor's responsibility.
If they need some additional styles to be set, use the Adobe Style System. But do not abuse page properties for CSS file configurations.
I mean "hundreds of pages" sounds like a rather small site, but it might still increase your maintenance efforts a lot, when the first people start to complain about wrong colors or font sizes...

Is there a way I can re use view template files in ionic?

I am very new to angualrjs and ionic, so for my application i have a set of html code which is reused in multiple view templates. Is there a way I can move those repeated code to a file and include in the templates as I wanted.
Eg - I have a three different types of product details pages each have a block which shows the product price details. So If I can move the price part to another template file I can maintain/modify those part easily.

set case of content bound via content controls in docx

I have a docx file that contains a custom part and a web page that collects input from the user to populate that custom part. One of my "variables" is used multiple times in the document. In some cases, I need it to appear in ALL CAPS. In most cases, it should appear as the user entered it in the web form. We're using docx4j version 3.2.1.
Previously we used "mail merge" fields which allowed for instructions like /* UPPER */ and /* CAPS */.
is there a way to get that same behavior using content controls?
You should be able to set the rPr property on a plain text content control to include:
http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/caps.html
Failing that, its not elegant, but you could always include a second element in your XML with the caps form.

Which css files get included by AEM by default when you specify a design for your website?

I've created a website in AEM and created a design for that website. Initially the design included a folder with images and a css file called static.css. When I specify the cq:designPath on a node in my website's content, the static.css file gets included automatically (/etc/designs/mywebsite/static.css); AEM also tries to include another file (/etc/designs/mywebsite.css). If the static.css file doesn't exist, it will NOT get included, but the mywebsite.css file gets included ('ed to) regardless of whether or not it exists. The documentation I have found (see here) suggests that you can include any number of css files in your design, but when I try to add addition css files to the /etc/designs/mywebsite/ folder, none of them get included. Am I missing something here? Should all the css files under /etc/designs/mywebsite/ be included in the site, or is it intended that only /etc/designs/mywebsite.css and /etc/designs/mywebsite/static.css are included automatically and any additional files need to be included manually?
The .css extension on the design node invokes a servlet (/libs/wcm/core/components/designer/designer.css.java) which dynamically generates CSS based on various nodes from the design's jcr:content node into CSS.
When a content author switches to design mode (WCMMode=Design), the edit dialogs save to the either the currently-applied design or the default (/etc/designs/default) design's jcr:content node. The template used to create the page, along with the path of the component being edited will determine the path under the jcr:content node where the design settings are saved.
For instance, if you edit an out-of-the-box parsys component you will see an option to editing the "Cell Padding"
If you enter a CSS padding value into the text box and click OK, the value will be saved to a div.padding property at the following location:
/etc/designs/mydesign/jcr:content/mytemplate/par/section[div.padding="30px"]
The servlet will then render the following in the design CSS:
.mytemplate .par div.section {
padding: 8px;
}
The class that actually converts the nodes to CSS is the CSSWriter in the cq-wcm-core jar.
For more information, see a similar question I asked a while back:
In Adobe AEM, how does the parsys component inject styles into the design css file?
Just a short correction. Actually it is not: /etc/designs/mydesign/jcr:content/mytemplate but instead /etc/designs/mydesign/jcr:content/my_page_component
That means if two pages have different templates but share the same page rendering component, then they will share the same design configuration and their components will write at the same location in Design Mode.