Menu & Homepage

Post Reply
bigboy
Jr. Bludit
Posts: 4
Joined: Fri Jun 12, 2020 11:29 am

Hi,

I'm new to Bludit and am trying to port an existing website to Bludit 3.12.0 that was running under another, sadly dying flat-file cms.
That site is not a blog but just a "normal" presentation of a business.
I realised all pages as static pages in two levels with a drop-down menu.
My theme is based on "HappyBuddha".
As much as I till now like Bludit I found that it is very much oriented towards blogs.
Maybe that's the reason that in the (English) documentation I could not find the explanations I looked for.
So now I have some questions (probably more to come as I progress):
1. The menu (in the theme's header.php adapted by me) works with

Code: Select all

if (ORDER_BY == 'position') {
  foreach ($staticContent as $staticPage) {
  ...
How can I call the homepage (the one appearing by calling https://example.com/) as "Home" from the menu working as above and not only from the "brand" on the left?

2. How can I realise for one of the other pages in the menu the same behavior as the default homepage has, i.e. that I have that page in the menu and all the articles as separately editable content underneath it without appearing in the menu but only as articles (like posts) in the body of that page?
I tried to attribute home.php as template for that page, but that had no effect.

Thank you for tips.
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

bigboy wrote: Tue Jun 16, 2020 12:45 pm How can I call the homepage (the one appearing by calling https://example.com/) as "Home" from the menu working as above and not only from the "brand" on the left?
You can use the following:

Code: Select all

<a href="' . $site->url() . '">Home</a>'
<?php foreach ($staticContent as $staticPage): ?>
   <a class="" href="<?php echo $staticPage->permalink() ?>"><?php echo $staticPage->title() ?></a>
<?php endforeach ?>
2. How can I realise for one of the other pages in the menu the same behavior as the default homepage has, i.e. that I have that page in the menu and all the articles as separately editable content underneath it without appearing in the menu but only as articles (like posts) in the body of that page?
You can assign a page at "Settings" > "General" > "Advanced" > "URL Filters" in the field "Blog".

Because there is a bug in the latest version you have to fix it with the following:

viewtopic.php?p=8106#p8106
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
Post Reply