I am trying to remove SonataAdmin logo. I don't want any picture. Every param that I put in my .yml file I get a broken picture icon on my admin view.
I have checked the conifguration and there is no wirtten documentation of how to hide logo.
sonata_admin:
templates:
user_block: '#AdminTemplates/user_block.html.twig'
title: My App
title_logo: /bundles/sonataadmin/logo_title.png //-- this part
Put your logo file here
src/AppBundle/Resources/public/images/your_logo.png
install asset :
$ php bin/console assets:install
And I think you have just to delete the first slash / in the title_logo :
# app/config/config.yml
sonata_admin:
templates:
user_block: '#AdminTemplates/user_block.html.twig'
title: My App
title_logo: bundles/app/images/your_logo.png //-- this part
The point here is to make a transparent image , so you can't see the logo, otherwise , there is no way to do it .
Related
I've used the hugo-icon single page theme to build a static site and have been asked to add a new page for product descriptions. I have read many tutorials/answers on stack and watched Mike Danes videos to date but cannot get a new page to render.
When I run the following command hugo new products/product1/_index.md a url to product1 is generated but no content is rendered. This is the content of my _index.md file;
---
title: "Product1"
date: 2021-05-24T14:47:36+01:00
draft: false
---
product1 info
I expect one of 2 things; To see 'product1 info' rendered at the url. OR I place a html file of the same name somewhere in the folder structure to render text etc. I have tried multiple locations to place html and still I cannot see anything.
Can someone explain or give an example of adding a new page to the hugo-icon theme and explain if I am missing a fundamental concept.
config:
# Main config file for icon theme.
theme = ["hugo-icon"]
baseURL = "https://www.example.com/"
languageCode = "en-ie"
title = "my site"
[params]
author = "Me"
description = "My site"
# Hero section (from here on is for icon theme)
[params.hero]
img = "images/hero_bg_green.jpg"
title = "My Site"
Thanks
I was missing this fundamental design pattern. Each folder created under layouts required a template. In my case this looked like the following where each page was designed inside the single.html file
Layouts
page1
single.html
page2
single.html
The route needs defining in the content folder inside content/pages/page-one.md like so where type is mapped to the folder name by its type definition
type : "page1"
title: "Page 1"
date: 2021-05-27T11:16:39+01:00
draft: false
My url therefore is www.example.com/pages/page-one.html which is designed in layouts/page1/single.html and mapped via the type definition to www.example.com/content/pages/page-one.md
The .md file inside content/... dictates the path to the url. The type definition dictates which page to render from layouts/...
I want to change hugo's post image.
+++
title = "how to read the book"
draft = false
date = "2017-01-25T21:39:26-06:00"
image = "book.jpg"
+++
Hello World. New Book Review.
I put book.jpg under mywebsite/static/images/ directory. But the post still using the default image.
Any suggestions?
I solved this issue by changing image = "book.jpg" to thumbnail = "images/book.jpg"
I followed the official guide from https://gohugo.io/overview/quickstart/ originally. It is very confusing.
If you're using front matter to configure your posts, follow these steps:
In your config.yaml file, make sure the cover parameters are set to not hide images
cover:
hidden: false # hide everywhere but not in structured data
hiddenInList: false # hide on list pages and home
hiddenInSingle: false # hide on single page
Add the image to the static folder (ex. meteor.png)
In your post's front matter, add the following lines to reference the image
---
title: "Impact Fanatics"
date: 2022-09-27T18:03:38-04:00
draft: false
relative: true
cover:
image: /meteor.png
---
So I'm trying to get started with Wagtail, following the 10 minute guide but I'm having a problem creating A basic blog.
So after modifying blog/models.py:
from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
class BlogIndexPage(Page):
intro = RichTextField(blank=True)
content_panels = Page.content_panels + [
FieldPanel('intro', classname="full")
]
And running makemigrations and migrate:
$ python manage.py makemigrations
Migrations for 'blog':
blog/migrations/0001_initial.py:
- Create model BlogIndexPage
$ python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, blog, contenttypes, home, sessions, taggit, wagtailadmin, wagtailcore, wagtaildocs, wagtailembeds, wagtailforms, wagtailimages, wagtailredirects, wagtailsearch, wagtailusers
Running migrations:
Applying blog.0001_initial... OK
The default template (blog/templates/blog/blog_index_page.html) is nowhere to be found. From what I understand, this file should be created automatically:
Since the model is called BlogIndexPage, the default template name (unless we override it) will be blog/templates/blog/blog_index_page.html:
Or perhaps I'm missing something?
Wagtail uses normal Django templates to render each page type. It automatically generates a template filename from the model name by separating capital letters with underscores (e.g. HomePage becomes home_page.html)
This is the expected behaviour. The template file / directory isn't created automatically on creating the page model - you have to add it yourself.
I have followed the tutorial/installation guide set out on the ReadMe.md file and am trying to find a way to position the banner at the bottom of the view but on top of the tab bar which I currently have.
Currently the banner ads show below the tab bar (see image) but they should site on top of it and at the same time not overlap the content. Is there a setting I am missing here?
Code:
AdMob.createBanner( {
adId: admobid.banner,
position: AdMob.AD_POSITION.BOTTOM_CENTER,
isTesting: true, // TODO: remove this line when release
overlap: false,
offsetBottomBar: true,
offsetTopBar: false
} );
this is my problem...
I have some of images and links that I want to load different joomla modules when user click on them.
mean each hyperlink can load another module|position
thanks all
In case that you just want to call a module's content from a url the following answer will help you.
If you just want to show / hide a module in the same page you could use something similar to my previous answer: Joomla 3 Show different modules on same position depending on toggler
Joomla provides the functionality to call a specific file of the active template by adding the tmpl=FILENAME key/value to the url's query string.
All built-in templates have a component.php file if user wants to load the template with the component only. You could check the following link for more details: Adding print pop-up functionality to a component.
You could do something similar to only show the modules that you want to load.
You could copy the component.php to a new file (I have used custom.php) and added the following php code in the <body> ... </body> part.
<?php
$jinput = JFactory::getApplication()->input;
$selectedPosition = $jinput->getString("position", "");
$selectedModule = $jinput->getString("module", "");
$selectedModuleTitle = $jinput->getString("title");
if($selectedPosition !== "") {
$modules = JModuleHelper::getModules($selectedPosition);
foreach ($modules as $module) {
echo JModuleHelper::renderModule($module);
}
} elseif ($selectedModule !== "") {
$module = JModuleHelper::getModule($selectedModule, $selectedModuleTitle);
echo JModuleHelper::renderModule($module);
}
?>
So with a similar way as loadposition / loadmodule works you could call the new template file using:
index.php?tmpl=custom&position=MODULE_POSITION
or
index.php?tmpl=custom&module=MODULE_TYPE
or
index.php?tmpl=custom&module=MODULE_TYPE&title=MODULE_TITLE
Optionally if you want to load the module with a specific style, you could pass it to the second paramter of the renderModule method like:
echo JModuleHelper::renderModule($module, array("style" => "xhtml"));
Hope this helps