I have a Plugin that adds something to the Product detail page and I want to make some changes to it.
That shouldn't be a problem, right? I just can do that in my Theme, but NO that doesn't work!
Here are the views attribute of my theme.json
"views": [
"#Storefront",
"#Plugins",
"#MegaTmlTheme",
"#MegaTrainingProducts"
],
And here is a Screenshot of the Profiler (Template Inheritance)
I want to change the accessory-product.html.twig, but as you can see, the Plugin template is loaded after the one from the Theme.
WHY? And how do I fix that?
In which order did you install Plugin and Theme?
The order seems to be depenend on the installation date.
See also
How to do a template multiple inheritance in Shopware 6?
and
In which order are Shopware 6 plugins loaded?
Related
I've installed a theme (that i bought) that's mainly made with Elementor.
Since I've been running into some issues with customizing this theme, (and still refuse to also pay money for Elementor Pro) I decided it would be easier to create a custom template myself.
I have done this before when I used a custom theme I made myself from scratch (I thought I was saving myself some time this time around...).
So my problem: I saved this template called page-home.php to my Child theme (that I made of the purchased Theme) in a folder called page templates.
It is not showing in the drop down menu when creating a new page.
I then just copied it to the main theme, activated that...and still not showing.
Is this because the Theme is using a page builder like Elementor?
Or do you think the creator of the theme somehow disabled this option?
Thanks in advance for any help.
As far as I know Elementor ignores the most of the standard theme file. It does so i.e. with the header.php for sure. The question is what do you want to put in a theme file what you couldn't do with Elementor. Have a look at the
"Hello Theme" https://github.com/elementor/elementor/issues/14283 - it's a plain theme.
If you don't want to pay for Pro, I recommand the plugin "Elementor – Header, Footer & Blocks Template" (and for better editor handling: "Flexible Elementor Panel")
In Gitlab, I've been able to render an Entity Relationship Diagram with Mermaid in a Markdown file as specified here.
This is the Markdown I used:
```mermaid
erDiagram
CUSTOMER }|..|{ DELIVERY-ADDRESS : has
CUSTOMER ||--o{ ORDER : places
CUSTOMER ||--o{ INVOICE : "liable for"
DELIVERY-ADDRESS ||--o{ ORDER : receives
INVOICE ||--|{ ORDER : covers
ORDER ||--|{ ORDER-ITEM : includes
PRODUCT-CATEGORY ||--|{ PRODUCT : contains
PRODUCT ||--o{ ORDER-ITEM : "ordered in"
```
The mermaid interactive editor provides an example of configuration:
{
"theme": "default"
}
But I don't know where to locate that configuration information. I've tried putting it in the same directory, in a file called config.json or mermaid-config.json, but neither of those have worked. I also tried including it in the Markdown which defined the diagram, which only caused it to render incorrectly. Is there a way to specify the theme or other CSS elements for Gitlab?
Just tried it out and it worked
```mermaid
%%{init: { 'theme':'dark', 'sequence': {'useMaxWidth':false} } }%%
sequenceDiagram
alice ->> mark: Sent a flower
```
Edit: If you are using a recent enough version of GitLab (possibly 13.9.0 from February, 2021, which changes the shipped version of Mermaid from 8.5.2 to 8.9.0) you can use directives, as mentioned in the other answers:
```mermaid
%%{init: { 'logLevel': 'debug', 'theme': 'dark' } }%%
graph LR
%%{config: { 'fontFamily': 'Menlo', 'fontSize': 18, 'fontWeight': 400} }%%
A-->B
```
Note that Mermaid seems to be sensitive to newlines here. If I add a blank line between graph LR and the following %%{config line I get a syntax error.
Original answer for older versions of GitLab:
I don't believe you can, unless you want to self-host and modify the GitLab source code.
The Mermaid.js configuration in GitLab is largely hard-coded. It looks like it uses the neutral theme by default and switches to the dark theme if
the user is using dark or solarizedDark as their web IDE theme, and
if the user is on the IDE web page.
Unfortunately current GitLab uses mermaidjs version 8.5.2 as per merge request
From mermaid 8.6 onward you should be able to use directives to set the theme and/or other settings without touching the hard coded css. For example:
%%{init: { 'theme': 'forest' } }%%
erDiagram
...
I'm afraid we have to wait a little longer, until GitLab updates to this version. You can check in the meantime mermaids doc on the matter. You can includes this already in your markdown, as the %% is interpreted as comments and will not show up in the rendering. But when GitLab makes the move, your pages should immediately update.
I would like apply on a laravel 5.4 project some basic theme switching ability.
I made under config folder a site.php config file where I added the following
return [
'theme' => realpath(base_path('my_theme/views'))
];
than in controller I call it like
Config::get('site.theme')
but when I try to pass to my controller I get View not found however the showed path is correct
How do I implement in case of laravel some basic theming functionality?
I got it between
config/views.php
'paths' => [
//resource_path('views'),
realpath(base_path('themes/my_theme/views'))
],
but still interested how would I apply a multi theme templating system in case of laravel
You probably want to use the theme as a layout. See the documentation here: https://laravel.com/docs/5.4/blade#defining-a-layout
This will allow you to build out a structured layout and then in your application you can switch which one you want to use between views. Typically all my views have an #extends('layouts.app') directive at the top. You could easily replace 'layouts.app' with whatever value you store in a config and a user chooses.
This relates to an Xpages project using openNtf's Extension Library for Domino 9.0.1 V 16 (2016-01-28). There is a custom theme applied that extends extLib's Bootstrap3 theme.
Now I also applied Mark Leusink's debugToolbar Plugin (V 4.0.1, 2014-03-10).
Unfortunately all tables that are display inside the toolbar are partially "destroyed", as in this example:
Debugging the resulting html I see that the "label" cells of the debug table are assigned class="label" or class="label wide". Unfortunately bootstrap.css applies a display: inline style to a .label selector.
Currently I solved this by applying my own custom css file to reset toolbar styling; but I wonder whether there might be a more elegant way, maybe some kind of property that I simply missed out here. Or is this something that have to be done within the toolbar's source code?
Please add this as a defect on the project, so the contributor is aware and can resolve.
Alternatively, download the source code from https://github.com/OpenNTF/DebugToolbar, contribute the fix and make a pull request.
Hopefully Paul's and my entries at github and within the openntf.org project will help resolving this issue. Meanwhile my workaround seems to be the only option here;
As I mentioned above I created a custom styleSheet with just one line in it:
div.dBar table.grid td.label{display:table-cell;}
Then I created a cusom control as a container for the debug toolbar so that I could link my custom style sheet as a resource. The debug custom control finally is added to all the xpages where I want to have the toolbar.
Maybe this can help others, too.
I'm trying create an affiliate directory on my Orchard site. The directory is populated by running a query on my custom Content Type. The directory needs to be sortable and searchable. I've set up a basic jsfiddle here that is a basic functioning version of what I'm attempting to do, but it's just in html: http://orchard1.pha.jhu.edu/affiliates-beta-2
Or you can view the jsfiddle here: http://jsfiddle.net/tgelles/AMZf8/
Has anyone discovered a way to best use isotope on an Orchard Projection? I've downloaded the Projection Layout module, but I have no idea how to use that/where to inject the specific isotope code. I've also created alternate template files for the Projection's Summary display, but I don't know how to best inject the isotope plugin into that razor file.
Any help would be appreciated.
The best way would be creating a shape, but You could easily edit the query template and inject the js through a custom view for that projection(url,type, etc)
Check in your Queries.
There was a video which helped me understand better how they work: http://www.youtube.com/watch?v=Ka55wTTXZg8
Hope it helps.