Hello, everyone.
Bug, feature or non-existent condition? I can't place widgets in the header and footer of the blog. Only on the left and right side.
FlatPress fp-1.3.dev [master]
Theme: Leggero, Style: Leggero-v2
Best regards
Frank
widgets in the header and footer
- fraenkiman
- Posts: 223
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
widgets in the header and footer
You are strong in PHP and Java Script? Then help us to improve FlatPress.
Looking for ideas, templates, examples and answers to frequently asked questions?
You'll find it here.
My FlatPress-Blog: https://frank-web.dedyn.io
Looking for ideas, templates, examples and answers to frequently asked questions?
You'll find it here.
My FlatPress-Blog: https://frank-web.dedyn.io
Re: widgets in the header and footer
Hi,
in fact, Leggero only supports the left and right widgets, see fp-interface/themes/leggero/widgets.tpl.
You can easily add the top and bottom widgets to your custom theme, though - just by adding
or
to any tpl file of your theme.
In general, it always depends on each theme. Some of the themes support all widget positions, others some, others none.
All the best,
Arvid
in fact, Leggero only supports the left and right widgets, see fp-interface/themes/leggero/widgets.tpl.
You can easily add the top and bottom widgets to your custom theme, though - just by adding
Code: Select all
{widgets pos="top"}
Code: Select all
{widgets pos="bottom"}
In general, it always depends on each theme. Some of the themes support all widget positions, others some, others none.
All the best,
Arvid
Project blogββ Docsββ Twitterββ Mastodonββ Forum RSS feedββ Project blog RSS feedββ Donate
FlatPress 1.3 "Andante" is released!
How to rework your themes and plugins for FlatPress 1.3 / Smarty 4
FlatPress 1.3 "Andante" is released!
How to rework your themes and plugins for FlatPress 1.3 / Smarty 4
- fraenkiman
- Posts: 223
- Joined: Thu Feb 03, 2022 7:25 pm
- Location: Berlin, Germany
- Contact:
Re: widgets in the header and footer
Thank you Arvid,
fit and worked for my purposes.
For those of us who would also like to have a header and footer in the Leggero-v2 style, here is a little to-doo:
1. Create two files (widgetstop.tpl and widgetsbottom.tpl) in the directory /fp-interface/themes/leggero.
2. Fill the widgetstop.tpl file with the following content:
3. Fill the widgetsbottom.tpl file with the following content:
4. Edit the files default.tpl, index.tpl, and static.tpl. Under the line {include file=header.tpl}
add the line with {include file=widgetstop.tpl}. Above the line {include file=footer.tpl} add the line with {include file=widgetsbottom.tpl}.
Now the existing CSS has to be adjusted.
To do this, edit the common.css file in the /fp-interface/themes/leggero/leggero-v2/res directory. First, the top margin of div#main needs to be collapsed to make room for the header.
5. Change line in the NORMAL DESIGN -> MAIN section to:
6. Insert the following lines between the BODY CONTAINER and MAIN in the NORMAL DESIGN section:
7. Insert the following lines between MAIN and FOOTER in the NORMAL DESIGN section:
8. Change the line in the RESPONSIVE DESIGN -> MAIN section to:
PS: If you still have the line float: center; , can delete them without replacement. Reason: center is not a valid value for float.
9. Insert the following lines between the BODY CONTAINER and MAIN in the RESPONSIVE DESIGN section:
That should be it. Now you can create a small menu in the header and footer via the admin center as a widget.
Sorry for my bad english, google helped
Best regards
fit and worked for my purposes.
For those of us who would also like to have a header and footer in the Leggero-v2 style, here is a little to-doo:
1. Create two files (widgetstop.tpl and widgetsbottom.tpl) in the directory /fp-interface/themes/leggero.
2. Fill the widgetstop.tpl file with the following content:
Code: Select all
<!-- beginning of Topmenu -->
<div id="columntop">
{widgets pos=top}
<div id="{$id}">
{$content}
</div>
{/widgets}
</div>
<!-- end of Topmenu -->
Code: Select all
<!-- beginning of Bottommenu -->
<div id="columnbottom">
{widgets pos=bottom}
<div id="{$id}">
{$content}
</div>
{/widgets}
</div>
<!-- end of Bottommenu -->
add the line with {include file=widgetstop.tpl}. Above the line {include file=footer.tpl} add the line with {include file=widgetsbottom.tpl}.
Code: Select all
{include file=header.tpl}
{include file=widgetstop.tpl}
....
{include file=widgetsbottom.tpl}
{include file=footer.tpl}
To do this, edit the common.css file in the /fp-interface/themes/leggero/leggero-v2/res directory. First, the top margin of div#main needs to be collapsed to make room for the header.
5. Change line in the NORMAL DESIGN -> MAIN section to:
Code: Select all
margin: 0px 20px 20px 20px;
Code: Select all
/* ===== TOP BAR ===== */
#columntop, #columnbottom {
margin: 10px;
background: none;
border: none;
font-size: 100%;
clear: both;
}
#columntop ul {
list-style-type: none;
margin-bottom: .5em;
}
#columntop li, #columnbottom li {
padding: 0px 10px;
}
#columntop ul li, #columnbottom ul li{display: inline}
Code: Select all
/* ===== BOTTOM BAR ===== */
#columnbottom {
text-align: center;
}
#columnbottom ul {
list-style-type: none;
}
Code: Select all
margin: 0px auto;
9. Insert the following lines between the BODY CONTAINER and MAIN in the RESPONSIVE DESIGN section:
Code: Select all
/* ===== TOP BAR ===== */
#columntop, #columnbottom {
margin: 10px;
background: none;
border: none;
font-size: 100%;
text-align: center;
}
#columntop ul {
list-style-type: none;
margin-bottom: .5em;
}
#columntop li, #columnbottom li {
padding: 0px 4px;
}
#columntop ul li, #columnbottom ul li{display: inline}
Sorry for my bad english, google helped
Best regards
You are strong in PHP and Java Script? Then help us to improve FlatPress.
Looking for ideas, templates, examples and answers to frequently asked questions?
You'll find it here.
My FlatPress-Blog: https://frank-web.dedyn.io
Looking for ideas, templates, examples and answers to frequently asked questions?
You'll find it here.
My FlatPress-Blog: https://frank-web.dedyn.io
Re: widgets in the header and footer
Is this worth of being a tutorial on the wiki?
Project blogββ Docsββ Twitterββ Mastodonββ Forum RSS feedββ Project blog RSS feedββ Donate
FlatPress 1.3 "Andante" is released!
How to rework your themes and plugins for FlatPress 1.3 / Smarty 4
FlatPress 1.3 "Andante" is released!
How to rework your themes and plugins for FlatPress 1.3 / Smarty 4
Who is online
Users browsing this forum: No registered users and 83 guests