Templates Folder in Magnolia CMS 5 - templates

I am setting up a Magnolia-based website and trying to place a template script into the templates folder in the webapp. However, I cannot find that folder anywhere. All tutorials say that, if I go to this directory magnolia-5.0/apache-tomcat-7.0.40/webapps/magnoliaAuthor in my enviroment, I can get it, but I haven't managed it.
I attach an screenshot of my magnoliaAuthor folder in which every folder that is supposed to be there actually is, except for the only one that I need (templates).
Hope you can help me with this. Thanks!

What kind of template?
If it is jsp, you can just place it anywhere you want in that folder and reference it from the template definition.
If it is freemarker template, those are by default served from either the classpath or from repository, so for testing you can just upload it to the repo via templates app http://yourtomcat:port/magnoliaAuthor/.magnolia/admincentral#app:templatesApp:;
BTW if you install samples module (add magnolia-templating-samples.jar in your WEB-INF folder), it will create folder "templates" in your webapp and extract sample jsp templates in that folder.
HTH,
Jan

Related

VuePress build deletes CNAME file in ./docs needed for Github Pages custom domain

I'm trying to get VuePress to work well with GitHub Pages and a custom domain. I have the site working -- https://www.southertonrr.com (repo) -- as long as I manually add a CNAME file to my output folder ('./dest', or in my case, './docs', because that's where GitHub Pages looks for the site) every time after I issue a build command. Otherwise, I assume the build command deletes everything in my output folder and rebuilds the entire site.
Is there a way to get vuepress build to either leave that file alone, or copy a CNAME file from my ./src to my ./docs? Should I be looking at the configureWebpack config to use webpack to do it? (I'm new to webpack.)
Different product completely, but I noticed that Docusaurus for React has a CNAME config setting that does this for you, so I thought I'd check to see if the VuePress community had something similar.
See relative document
Sometimes you may need to provide static assets that are not directly referenced in any of your Markdown or theme components - for example, favicons and PWA icons. In such cases, you can put them inside .vuepress/public and they will be copied to the root of the generated directory.

How to run django app in allen NLP environment?

I have created an API in Django. It is supposed to take a request and pass the argument to allenNLP files to gather a computed response. I want to know how to run my django app in allenNLP environment and I want all the source code of allenNLP to be in a folder in my django project. Is it possible and how can I do it?
What you're looking for is running AllenNLP inside django.
You can add AllenNLP libraries in your requirements.py. Next, the .py file can be stored in any of your source code hierarchy.
In your views.py, where you are getting request and extracting parameters, you can call the .py file which contains allennlp source code.
Not sure about what AllenNLP files you're talking about, if it's code files, they can go in your regular source code folder, if it's a static files, like Image, CSV etc, they need to go in static folder.
Please clar my understanding of your requirement if the answer doesn't address your question.

Copying a Website Template to AWS LightSail Joomal Stack

I have purchased a Joomla website template (including all content and images) from www.templatemonster.com/. When I was originally developing the website on my local machine using MAMP I created a folder under the HTDOCS parent directory and access the website by typing 'localhost\folder name'.
I have attempted to copy the files to the '/opt/bitnami/apps/folder name' assuming that this would be the correct method given that /opt/bitnami/apps/ contains the folders and files for the phpmyadmin dashboard, however this doesn't seem to work.
I followed the instructions as per https://docs.bitnami.com/installer/apps/joomla/#how-to-install-multiple-joomla-applications-in-the-same-instance, but this doesn't work because the conf directory doesn't exist within the template files. I assume this is because the Bitnami Stack includes the conf and htdocs directories under the Joomla parent by default, whereas in MAMPS the htpdocs directory would be the parent to the directories containing the content and so forth.
Is there something I am missing from this process?
Thank you for your help.
I would advise you the following:
First make a backup of /opt/bitnami/apps/joomla
Once the backup is done. Copy the template to /opt/bitnami/apps/joomla/htdocs
If it is a template with database contents you will also need to migrate the template database to mysql. The included phpmyadmin can be helpful.
You will probably have to modify the configuration files in case they are overwritten. Use the previously backed up folder for reference.

How to get Foundation for Apps page template to work?

I am trying to use any of these page templates located here Zurb
Some of the template (navbar), but not the content. Basically when I try to navigate to some content nothing happens. I have added the route info to no avail, i.e. -
name: home
url: /
When I create the basic starter project from here: Zurb, the project comes with .scss and a templates.js file, however the page templates just have a .css file.
I've looked through the documentation but haven't found anything showing how to use the page templates. Do I need to creata a .scss file and template.js file on my own and if so how?
For use this templates you must follow this former instruction http://foundation.zurb.com/apps/getting-started.html
For short:
install foundation nodejs module
create app – insert your
put template to client folder

How to download current template

We have to redo our joomla website, however we can't find our local customized template.
Is there any way to download the current used template? Or can I even use my ftp access to download the template folder, zip it and use that?
Thanks for your answers!
From the backend, you can't download it. But using FTP, you can download the folder, zip it and install it again if you want. That should work most of time for the simpler templates. If it's a bundle with a framework and other stuff, then it will fail because there are more files in other places.
The folder is within the /templates/ directory and depends on the name of the template.