Allow Static pages to have children.

Post Reply
BlakesHeaven
Ssr. Bludit
Posts: 16
Joined: Sat Jan 27, 2018 12:32 am

Tue Jan 30, 2018 12:31 pm

As per the title.

I don't think this is currently possible, but I'd certainly find it useful to link sub-pages to a static page. with option to display on menu of not for each page.
Many thanks in advance,
David
User avatar
Edi
Site Admin
Posts: 1134
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Tue Jan 30, 2018 1:48 pm

If you want to build a website with subpages you can set "order content by" to "position" (at advanced settings).

Static content is for additional pages, if you have a blog, or content, that can be used in a sidebar or the footer for example, if a theme makes use of this feature.

If you want a website and a blog just use two installations and link them.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
diego
Site Admin
Posts: 668
Joined: Sat May 16, 2015 2:53 pm
Contact:

Tue Jan 30, 2018 6:29 pm

Hi, I would like to know what kind of website are you working? I mean the structure you need. thanks
BlakesHeaven
Ssr. Bludit
Posts: 16
Joined: Sat Jan 27, 2018 12:32 am

Fri Feb 02, 2018 2:39 pm

Thanks for asking. The web site is to post up a program of events for a concert club with six events per quarter.

Let me just say that this came from me initially playing around to evaluate Bludit and when I tried the "Lingoberry" theme (which has no left menu, but a horizontal menu). At the time I may not have turned something on, but I was struggling to gain access to content that was not static.

Anyway, I realised the static Items appeared at the top horizontal menu and thought that might be a way of gaining access to a page that shows all and also provides links to the separate event pages as I do now. Only I realised I couldn't say the Lead-in page was a parent of the separate children pages, which is preferable from an Admin point of view.

2018 -Q1 (parent 1)
  • Event 1- (child)
  • Event 2 - (child)
2018- Q2 (parent 2)
  • Event 1- (child)
  • Event 2 - (child)

Anyway, I'm now using a slight variant of the default theme (that I'm tweaking myself) now and showing the Content in the left menu making use of the parent/child relationships. Yes - indeed, I am using the order by 'position'.

Potentially and optionally, if the content is both static and a parent, the children could appear as submenu items

Anyway, I'll leave that with you...
... and also say that I'm really happy with Bludit having chosen it over a number of other solutions.
Many thanks in advance,
David
User avatar
diego
Site Admin
Posts: 668
Joined: Sat May 16, 2015 2:53 pm
Contact:

Sat Feb 03, 2018 10:54 am

I think your site is correct like you mention.
- Order by position
- Pages with Subpages

The problem here is the theme and maybe the plugins for the sidebar. I'm working on the user experience with Edi (he has some good ideas), also I always ask what kind of site do you want to do and try to find the easy and best way to do it.

Regards
User avatar
Edi
Site Admin
Posts: 1134
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Sun Feb 04, 2018 12:12 am

I added an additional plugin to show a navigation in the sidebar of all published pages.

The plugin allows to choose, if subpages should be shown or not.

You can download it from:

https://github.com/bludit-plugins/navigation
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
BlakesHeaven
Ssr. Bludit
Posts: 16
Joined: Sat Jan 27, 2018 12:32 am

Tue Feb 06, 2018 3:12 pm

Fantastic - thanks Edi!
I've downloaded it and will give it ago. :D
Cheers,
David
User avatar
Torsten_Kelsch
Master Bludit
Posts: 132
Joined: Thu Aug 27, 2015 10:24 pm
Location: Germany
Contact:

Thu Feb 15, 2018 12:57 pm

This is the plugin I’ve really been waiting for (but couldn’t program by myself because of my weak programming skills). Very useful. Thanks, Edi!
ON ERROR GOTO BED
User avatar
Torsten_Kelsch
Master Bludit
Posts: 132
Joined: Thu Aug 27, 2015 10:24 pm
Location: Germany
Contact:

Thu Feb 15, 2018 2:45 pm

I wrote a little improvement to Edi’s navigation plugin: The code recognizes, which page the user is currently on. Those currently visited pages can be highlighted in the menu via CSS.

Code: Select all

#$html .= '<li class="menu"><a href="'.$Parent->permalink().'">'.$Parent->title().'</a></li>';
$html .= '<li'.( ($Parent->key()==$Url->slug())?' class="active"':'').'><a href="'.$Parent->permalink().'">'.$Parent->title().'</a></li>';
The line no. 57, which I commented out, is the original, and the line below is my modification. I deleted the class, which was given each and every list item. This is not needed, because the unordered list has already a class, so the styling for the list items can be done in the CSS file like this:

Code: Select all

ul.menu li {
  …
}
Instead, I gave a class only to the list item for the currently visited page. And that can be styled via CSS, for example like the following:

Code: Select all

.active {
  font-size: bold;
}
ON ERROR GOTO BED
Post Reply