independent/standalone pages
-
arfa
- Master Bludit
- Posts: 163
- Joined: Tue Jul 04, 2017 4:31 am
- Location: New Zealand
- Has thanked: 13 times
- Been thanked: 27 times
Is there some way of using std. page creation, or there might be a plugin, to save a page that can be linked to independently - outside of the std/sttic/static link options?
Or manually creating a file, uploading it and being able to link to it.
Eg. topic specific information that can be presented only from individually set links - and loaded within the bludit environment.
I am looking at this:
https://plugins.bludit.com/plugin/bludi ... text-files
but first trial leaves me wondering just what it does. Is says: "Show static file content at the provided route you desire." but gives no indication as to how to call the file. I have written to the author.
Any suggests?
Thanks
Or manually creating a file, uploading it and being able to link to it.
Eg. topic specific information that can be presented only from individually set links - and loaded within the bludit environment.
I am looking at this:
https://plugins.bludit.com/plugin/bludi ... text-files
but first trial leaves me wondering just what it does. Is says: "Show static file content at the provided route you desire." but gives no indication as to how to call the file. I have written to the author.
Any suggests?
Thanks
-
arfa
- Master Bludit
- Posts: 163
- Joined: Tue Jul 04, 2017 4:31 am
- Location: New Zealand
- Has thanked: 13 times
- Been thanked: 27 times
Sorry about the language. And, thank you for reading.
I want to have access to data, in a file, stored locally (online) that is accessible, can be loaded in the main environment [this looks like [div class="col-md-9"] , via a page link but that file data is not displayed - either by default on the main page listings or on the static page menu.
eg: a sample: normal page text:
This is all about this topic and here is some sample text with further detail [link to test.txt]available here[/link] which I am sure you will find interesting. blah blah...
Where test.txt is in a folder; at this stage probably created manually but I am thinking of a plugin. I am sure it can be done, just a matter of how/where to start. I am moderate coder but bludit is relatively new so I am still getting my bearings.
I hope this makes more sense?
Have a good day.
Kusalo
I want to have access to data, in a file, stored locally (online) that is accessible, can be loaded in the main environment [this looks like [div class="col-md-9"] , via a page link but that file data is not displayed - either by default on the main page listings or on the static page menu.
eg: a sample: normal page text:
This is all about this topic and here is some sample text with further detail [link to test.txt]available here[/link] which I am sure you will find interesting. blah blah...
Where test.txt is in a folder; at this stage probably created manually but I am thinking of a plugin. I am sure it can be done, just a matter of how/where to start. I am moderate coder but bludit is relatively new so I am still getting my bearings.
I hope this makes more sense?
Have a good day.
Kusalo
- Jay
- Master Bludit
- Posts: 144
- Joined: Mon Feb 11, 2019 8:41 pm
- Has thanked: 6 times
- Been thanked: 4 times
If you want to have static pages available to be edited with bludit, and not automatically displayed anywhere on your website, your only problem to solve lay in functions responsible for displaying links to static pages, like menu functions.
Either create your own function for listing static pages with exceptions if you want a dynamically created lists with links, or if you have couple static pages you can skip automatic menu generation and just hardcode menu in template file.
For automatically generated menus you'd base on exceptions not to show such pages. I'd try with assigning all "hidden" pages a specific template name or just base on page's properties like robots in seo options.
https:/nietak.de
as for the plugin you mentioned in first post, I assume it's about uploading static pages under own directory in your website that will add exception to bludit's routing functions.
Either create your own function for listing static pages with exceptions if you want a dynamically created lists with links, or if you have couple static pages you can skip automatic menu generation and just hardcode menu in template file.
For automatically generated menus you'd base on exceptions not to show such pages. I'd try with assigning all "hidden" pages a specific template name or just base on page's properties like robots in seo options.
https:/nietak.de
as for the plugin you mentioned in first post, I assume it's about uploading static pages under own directory in your website that will add exception to bludit's routing functions.
Last edited by Jay on Wed Feb 26, 2025 12:56 am, edited 1 time in total.
-
arfa
- Master Bludit
- Posts: 163
- Joined: Tue Jul 04, 2017 4:31 am
- Location: New Zealand
- Has thanked: 13 times
- Been thanked: 27 times
@jay - many thanks for your thoughts. I have not quite got to the menu generation part but here is my first fix for not displaying pages. From my 'notes to self':
NB - using theme blogx...
TO CREATE HIDDEN FILES - using static pages
create a new page, set it as static before saving
set the title with a leading '_' eg. _A Test
this will create a normal page folder 'a-test'
to stop the page being added to the navbar
replace the equivalent install code in blogx/php/navbar.php
to display the page without the '_' in the title add code in bl-themes/blogx/php/page.php
replace the equivalent install code with:
I will now be looking at having a menu in a template page. I am still learning the bludit layout and... docs (bludit.com) still down so I will wait on that one. Unless anyone has some basic guidance on inserting a menu builder. I have a really simple 30 line php that I use but am happy to have suggestions.
thanks - Kusalo
NB - using theme blogx...
TO CREATE HIDDEN FILES - using static pages
create a new page, set it as static before saving
set the title with a leading '_' eg. _A Test
this will create a normal page folder 'a-test'
to stop the page being added to the navbar
replace the equivalent install code in blogx/php/navbar.php
Code: Select all
<!-- Static pages -->
<?php foreach ($staticContent as $staticPage):
if (substr($staticPage->title(),0,1) !== '_') {
echo '<li class="nav-item">
<a class="nav-link" style="color:#FFF;" href="'.$staticPage->permalink()
.'">'.$staticPage->title().'</a></li>';
} ?>
<?php endforeach ?>
replace the equivalent install code with:
Code: Select all
<!-- Title -->
<a class="text-dark" href="<?php echo $page->permalink(); ?>">
<h2 class="title">
<?php
if (substr($page->title(),0,1) == '_') { $pageTitle = str_replace('_','',$page->title()); }
else { $pageTitle = $page->title(); }
//echo $page->title();
echo $pageTitle;
?>
</h2>
</a>thanks - Kusalo
- Jay
- Master Bludit
- Posts: 144
- Joined: Mon Feb 11, 2019 8:41 pm
- Has thanked: 6 times
- Been thanked: 4 times
you quite overcomplicate the workflow
I'd go the simplest way possible, create a static page, and use one of its options field.
Lets insert a "hidden" string in pages options->advanced->template field, so that we won't include such pages in generated menu.
For blogx template we only need to add 2 lines of code to generate the menu excluding "hidden" pages.
You could also base on tag input field or have a category for hidden pages, but you'd also have to edit functions for displaying tags or categories to add exceptions for the hidden pages. Assuming that you would want to hide the tag/category for hidden pages.
I'd go the simplest way possible, create a static page, and use one of its options field.
Lets insert a "hidden" string in pages options->advanced->template field, so that we won't include such pages in generated menu.
For blogx template we only need to add 2 lines of code to generate the menu excluding "hidden" pages.
Code: Select all
<div class="nav" id="navbarResponsive">
<ul class="">
<?php foreach ($staticContent as $staticPage): ?>
<?php if ($staticPage->template() !== "hidden") : ?>
<li class="nav-item">
<a class="nav-link" href="<?php echo $staticPage->permalink() ?>"><?php echo $staticPage->title() ?></a>
</li>
<?php endif; ?>
<?php endforeach ?>
</ul>
</div>
-
arfa
- Master Bludit
- Posts: 163
- Joined: Tue Jul 04, 2017 4:31 am
- Location: New Zealand
- Has thanked: 13 times
- Been thanked: 27 times
I really appreciate the follow up Jay but need a bit more clarification - I am the newbie here
- and I do like simple.
>> insert a "hidden" string...
I am not sure what this means. I am sure it will be obvious if you could give me an example please?
The navbar code is clear enough - just not sure how to get the 'hidden' bit embedded.
Thanks - Kusalo
>> insert a "hidden" string...
I am not sure what this means. I am sure it will be obvious if you could give me an example please?
The navbar code is clear enough - just not sure how to get the 'hidden' bit embedded.
Thanks - Kusalo
- SpegalDev
- Sr. Bludit
- Posts: 38
- Joined: Tue Jun 13, 2023 11:27 pm
- Location: Michigan, USA
- Has thanked: 6 times
- Been thanked: 34 times
- Contact:
I think Jay was talking about adding a custom field. You can do so in /admin/settings:
Then, when you're creating a new article, go to Options -> Custom -> check "Hidden Page"
Then, in your navigation, you just need to check and see if the page has that option enabled.
Code: Select all
{
"hidden": {
"type": "bool",
"label": "Hidden Page",
"tip": "Check if the article should be hidden in navigation."
}
}Then, in your navigation, you just need to check and see if the page has that option enabled.
BluditLab — Explore a comprehensive collection of Bludit themes and plugins, offering both free and premium options to elevate your Bludit site. Find the perfect tools for customization, SEO, and more.-
arfa
- Master Bludit
- Posts: 163
- Joined: Tue Jul 04, 2017 4:31 am
- Location: New Zealand
- Has thanked: 13 times
- Been thanked: 27 times
Thanks Segal.
admin > settings/general > custom fields.
It would be useful for newbs if there was whitespace between the [] - to make it obvious [ ]
In my first attemt (in haste?) I deleted that.
Added the code - save >
new content > options > custom fields ... and there is the checkbox. I check it - save
but the page is on the navbar
Do it with the brackets and there is no checkbox.
I see the code in databases/site.php and that seems fine.
Check Jay's code in navbar.php = OK
What am I missing here?
thanks - k
admin > settings/general > custom fields.
It would be useful for newbs if there was whitespace between the [] - to make it obvious [ ]
In my first attemt (in haste?) I deleted that.
Added the code - save >
new content > options > custom fields ... and there is the checkbox. I check it - save
but the page is on the navbar
Do it with the brackets and there is no checkbox.
I see the code in databases/site.php and that seems fine.
Check Jay's code in navbar.php = OK
What am I missing here?
thanks - k

