Include slide in Xaringan presentation if condition based on parameter is true - r-markdown

I would like to include a slide only if a metadata parameter is true.
As an example if the rmarkdown::metadata$institute parameter is not NULL , include the slide showing institution's blurb.
Regards

Related

Tag 'amp-story' is not allowed to have any sibling tags ('body' should only have 1 child).UNKNOWN line 1038, column 0

I am trying to implement amp-story in blogspot template. While trying to validate in AMP Validator; it is showing the only error
"Tag 'amp-story' is not allowed to have any sibling tags ('body' should only have 1 child)."
In the window of "the AMP VALIDATOR", on deletion the code "b:section id='fixelements' showaddelement='no', which was the only code in the "body" section [other than amp-story codes] it is showing
Validation Status: PASS
But after deletion from my blogspot theme template, it is showing error :
"We did not find any section in your theme. A theme must have at least one b:section tag."
Please help.

Full local customisation for html template and css theme/hightlighting

I am currently exploring the R Markdown configurations and the possibilities for the HTML output. My goal is to have a local html template as well as a local css theme file which behaves exactly the same as if I would select theme/highlight options in in the yaml configurations.
I used the following configuration:
output:
html_document:
theme: united
highlight: tango
toc: true
toc_depth: 3
toc_float: # set to false if you do no want a floating toc
collapsed: true
smooth_scroll: true
I now want to be able to customize the HTML structure and the CSS by my own. I started with the HTML template as follows:
Downloaded the standard pandoc HTML5 template and copied it into a local template.html file. I changed my configuration to
output:
html_document:
template: template.html
theme: united
highlight: tango
toc: true
toc_depth: 3
toc_float: # set to false if you do no want a floating toc
collapsed: true
smooth_scroll: true
There are several problems arizing:
the TOC is not shown anymore
the rendered HTML design of the output changed, i.e. I have no margin at all - all javascript functionality is gone, so no DT support, no tabs, no scrolling etc.
My question is: How can I achive the exactly same design and functionality I had before with my configuration but having the template/theme/highlight files stored locally? (So a template.html and a styles.css and all the needed JS files)
Let me know if I need to give further details. Thanks!
The Pandoc default you linked to is not the default used in rmarkdown. That one is stored in system.file("rmd/h/default.html", pkg = "rmarkdown"), and a current version is online here: https://github.com/rstudio/rmarkdown/blob/master/inst/rmd/h/default.html.
You should also study the source to rmarkdown::html_document if you decide to modify the default template. You'll also have to make some other changes if template != "default".

How can I make the "if" statement for a link to work fine if I want to show it only if it's not the "Index" page

In my application,the first page is Index.tml and I have a login form.
The layout for this application has a menu with some links in it and I added another one which is called "Delogheza-te"=Log-out.
What I want is that ,the "log-out link" to be visible only after the user logged-in.
The log-out link should be visible on all pages except "Index.tml".
How can I do that?
I tryed this but it's wrong.
<t:if t:page!="Index">
Delogheaza-te
</t:if>
For this situation I like to give the layout component a component parameter, maybe a boolean showLogout, which is true by default but can be set to false in some pages such as the index page.
-- in Layout.java --
#Parameter(value="true")
#Property
boolean showLogout;
-- in Layout.tml --
<t:if test="showLogout">
(logout link here)
</t:if>
-- in Index.tml --
<html t:type="layout" showLogout="false">

Is there anyway to change the structure of the content page on Drupal 8?

I want to change how my content is displayed on my "add content" page. Instead of just listing the content with no particular structure other than filtering by "Content Type", "Author", "Status", etc. I want to display the content hierarchy. Like:
--Content1
------Content2
----------Content3
----------Content4
------Content5
Is there anyway to do this?
Pretty vague question so I'm just going to suggest a few things that I think you could use:
Field Group module: Provides the ability to group your fields on both form and display.
https://www.drupal.org/project/field_group
Paragraphs module: Paragraphs is the new way of content creation!
It allows you — Site Builders — to make things cleaner so that you can give more editing power to your end-users.
https://www.drupal.org/project/paragraphs
You can also just re-arrange the order of fields in the 'manage display' tab of your content type.

OrchardCMS Replacement Tokens for Query Results displaying HTML tags instead rendering them

I am having problems understanding the token system for the output of query / projections.
If I leave the property as is it displays the text content with HTML formatting intact.
But I need to wrap it with a tag, the html tags get displayed as text.
Rewrite Results -> Rewrite output
<div class="collapse" id="toggle_{Content.Id}">
{Content.Fields.CaseStudy.ClientChallenge} </div>
I am trying to create a collapsible text area, I already have a button that hides/unhides the content.
Why is it displaying as text instead of rendering the tags properly.
I think this is because I don't know how replacement tokens work.
Another example problem is up one level on the edit Layout, I want to set the item class to work-item {Category}, Category being the name/title of a property, which I am using for grouping.
Right above the projection: I want to include some html that lists all the Categorys in a ul i.e. data-filter=".experiential" I have tried things like: work-item {Category} and work-item {Content.Fields.CaseStudy.Category}. Category is a "term" (?) from a taxonomy.
I feel like I am failing to understand how it all works.
Submitted as a bug https://github.com/OrchardCMS/Orchard/issues/7355
Will edit and post if it is fixed. In case anoyong else comes across this issue.