Portfolio

Post Reply
User avatar
LRAM
Master Bludit
Posts: 144
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Contact:

Hi

on this website
https://lucy-racquel-and-me.com/

I need to create a sub page. a page only available from a link of an ordinary page, not visible immediatly
Is there a way to do that ?
thanks
User avatar
Edi
Site Admin
Posts: 2079
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Depending of the theme/navigation child pages are not shown. Otherwise you can exclude the child page with an if-condition using the slug.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
LRAM
Master Bludit
Posts: 144
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Contact:

Thank Edi

Unfortunately, I'm not good enough at coding for that kind of things
I'll try another way
haev a good day
User avatar
Edi
Site Admin
Posts: 2079
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

What do you use in the navigation: default content or static content?
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
LRAM
Master Bludit
Posts: 144
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Contact:

I use both
the static for the menu
the defaut for the songs and their art cover
I want to add a page unvisible at first glane, only available with a link from a defaut page
User avatar
Edi
Site Admin
Posts: 2079
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

LRAM wrote: Sat Aug 01, 2020 2:23 pm I use both
the static for the menu
the defaut for the songs and their art cover
I want to add a page unvisible at first glane, only available with a link from a defaut page
Can you please mail your theme.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
LRAM
Master Bludit
Posts: 144
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Contact:

it's the standard portfolio theme
I only made change on the navbar.php to add my social media icon

Here it is
https://mega.nz/file/bZ4TkCyT#D3CUETNec ... 8iD3S1etVk
User avatar
LRAM
Master Bludit
Posts: 144
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Contact:

Hi
any idea ?
User avatar
Edi
Site Admin
Posts: 2079
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

You can use in the file navbar.php in the directory /bl-themes/portfolio-master/php the following:

Code: Select all

	<?php
	    foreach ($staticContent as $staticPage) {

	    $url = $site->url().'/'.$staticPage->slug();

			if ($staticPage->slug() != "404" && $staticPage->permalink() == $url) {
				echo '<li>';
				echo '<a href="'.$staticPage->permalink().'">'.$staticPage->title().'</a>';
				echo '</li>';
			}
		}
	?>
instead of

Code: Select all

	<?php foreach ($staticContent as $staticPage): ?>
	<?php if ($staticPage->slug() != "404") { // hide 404 error page from menu ?>
	<li>
		<a href="<?php echo $staticPage->permalink() ?>"><?php echo $staticPage->title() ?></a>
	</li>
	<?php } ?>
	<?php endforeach ?>
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
LRAM
Master Bludit
Posts: 144
Joined: Sat Sep 24, 2016 4:02 pm
Location: France
Contact:

Thank a lot Edi, I will try that
Post Reply