Jump to content
TNG Community
pipsi

solved / Adding 4th pull down menu

Recommended Posts

pipsi

I have created a 4th pull down menu - as described in Custom Menu Hook - see att customconfig.php - works fine!

 

now I have added the Index.php as follows to have the entries from the 4th pull down menu also as left menu items:

 

    echo "<li><a href=\"{$cms['tngpath']}customconfig.php\" class=\"lightlink\">{$text['Mehr Geschichten']}</a><br /><br /></li>\n";

this leads to an empty page! somewhere I have there probably a thought error!????!

https://www.schuster-pippersteiner.at/genealogie/TNG/index.php

 

Many thanks for tips!

Ingrid

4th pull down menu.PNG

customconfig.txt

Share this post


Link to post
Share on other sites
theKiwi

You can't include the customconfig.php file to make a menu as you've done. You would need to include code like this into the index.php and topmenu.php files to get those items to show up

<li><a href="#" class="menulink  ">Mehr Geschichten</a>
<ul class="last" style="overflow: hidden; display: block; height: 0px; z-index: 51; opacity: 0.005494505494505495;">
<li><a href="extrapgs/Intro Schuster-Pippersteiner.php" title="Schuster"><img src="img/FAM1.jpg" class="menu-icon" alt=""> <span class="menu-label">Schuster</span></a></li>
<li><a href="extrapgs/Intro Schuster-Pippersteiner.php" title="Pippersteiner"><img src="img/FAM1.jpg" class="menu-icon" alt=""> <span class="menu-label">Pippersteiner</span></a></li>
<li><a href="extrapgs/Intro Oswald-Schön.php" title="Oswald"><img src="img/FAM1.jpg" class="menu-icon" alt=""> <span class="menu-label">Oswald</span></a></li>
<li><a href="extrapgs/Intro Oswald-Schön.php" title="Schön"><img src="img/FAM1.jpg" class="menu-icon" alt=""> <span class="menu-label">Schön</span></a></li>
<li><a href="extrapgs/Dočkal - Hauschroniken.php" title="Baliny č.15"><img src="img/Haus.jpg" class="menu-icon" alt=""> <span class="menu-label">Ballin Nr.15</span></a></li>
<li><a href="extrapgs/Dočkal - Hauschroniken.php" title="Velké Meziříčí č.201"><img src="img/Haus.jpg" class="menu-icon" alt=""> <span class="menu-label">Groß Meseritsch Nr.201</span></a></li>

</ul>
</li>

Roger

Share this post


Link to post
Share on other sites
pipsi

Roger,

thank you! I'll try it this way.

 

Ingrid

 

Share this post


Link to post
Share on other sites
pipsi
vor 50 Minuten schrieb theKiwi:

You can't include the customconfig.php file to make a menu as you've done. You would need to include code like this into the index.php and topmenu.php files to get those items to show up


<li><a href="#" class="menulink  ">Mehr Geschichten</a>
<ul class="last" style="overflow: hidden; display: block; height: 0px; z-index: 51; opacity: 0.005494505494505495;">
<li><a href="extrapgs/Intro Schuster-Pippersteiner.php" title="Schuster"><img src="img/FAM1.jpg" class="menu-icon" alt=""> <span class="menu-label">Schuster</span></a></li>
<li><a href="extrapgs/Intro Schuster-Pippersteiner.php" title="Pippersteiner"><img src="img/FAM1.jpg" class="menu-icon" alt=""> <span class="menu-label">Pippersteiner</span></a></li>
<li><a href="extrapgs/Intro Oswald-Schön.php" title="Oswald"><img src="img/FAM1.jpg" class="menu-icon" alt=""> <span class="menu-label">Oswald</span></a></li>
<li><a href="extrapgs/Intro Oswald-Schön.php" title="Schön"><img src="img/FAM1.jpg" class="menu-icon" alt=""> <span class="menu-label">Schön</span></a></li>
<li><a href="extrapgs/Dočkal - Hauschroniken.php" title="Baliny č.15"><img src="img/Haus.jpg" class="menu-icon" alt=""> <span class="menu-label">Ballin Nr.15</span></a></li>
<li><a href="extrapgs/Dočkal - Hauschroniken.php" title="Velké Meziříčí č.201"><img src="img/Haus.jpg" class="menu-icon" alt=""> <span class="menu-label">Groß Meseritsch Nr.201</span></a></li>

</ul>
</li>

Roger

@theKiwi

Roger,

thank you! I'll do it this way, get the following:

Parse error: syntax error, unexpected '<' in /web/WebSites/d/s/c/h/schuster-pippersteiner.at/htdocs/genealogie/TNG/templates/template4/index.php on line 56

line 56:

    <li><a href="#" class="menulink  ">Mehr Geschichten</a>
 

Ingrid

 

 

 

Share this post


Link to post
Share on other sites
theKiwi

So you've probably got this inside some <?php ?> tags, so the server is trying to process it as PHP

Put a 

?>

?>

before line 56, and then put 

<?php

after the last line you inserted - what happens then?

Roger

Share this post


Link to post
Share on other sites
pipsi
vor 12 Minuten schrieb theKiwi:

So you've probably got this inside some <?php ?> tags, so the server is trying to process it as PHP

Put a 

?>


?>

before line 56, and then put 


<?php

after the last line you inserted - what happens then?

Roger

@theKiwi

 

now the error is gone ... 😊

"Mehr Geschichten" is displayed - like a link ... 

 if I click on it, nothing happens, but my homepage link changed (at the end a '#')   https://www.schuster-pippersteiner.at/genealogie/TNG/index.php#   

Ingrid

"

mehr geschichten.PNG

Share this post


Link to post
Share on other sites
theKiwi

OK - try removing the 2 lines that start with 

<ul......

and

</ul>

and it should then show the menu items as a list.

Roger

Share this post


Link to post
Share on other sites
pipsi
vor 7 Stunden schrieb theKiwi:

OK - try removing the 2 lines that start with 


<ul......

and


</ul>

and it should then show the menu items as a list.

Roger

@theKiwi

Roger - thank you so much 😊 - now it works!

"only" two more questions:


* can I make the titles multilingual

  For "Mehr Geschichten" and "Ballin Nr.15" resp. "Groß Meseritsch Nr.201" I have already translations, because the customconfig.php is multilingual.

*  "Mehr Geschichiten" appears as a link, behind it there is "nothing", that might be confusing for a visitor of the site.

  Is there a possibility to display the entry as text and not as link?

Thank you again!
Ingrid

 

 

leftmenu.PNG

Share this post


Link to post
Share on other sites
pipsi

@theKiwi

Roger

I noticed, when I'm on one of these extrapgs, I can select some items in the left menu, marked with a green tick in the att image, on some it leads to my wp-page with "page not found" marked with a red "x" in the att image.


the link, if it goes to my wp-page with "page not found".
https://www.schuster-pippersteiner.at/genealogie/TNG/extrapgs/extrapgs/Dočkal - Hauschroniken.php
or

https://www.schuster-pippersteiner.at/genealogie/TNG/extrapgs/cemeteries.php

Do you have a solution for that too?

Thank you, Ingrid

 

leftmenu.PNG

Share this post


Link to post
Share on other sites
theKiwi

I think to fix this, and allow for language switching you'd need to replace that whole block of code you inserted with something like this

    echo "<li><a href=\"{$cms['tngpath']}customconfig.php\" class=\"lightlink\">{$text['Mehr Geschichten']}</a><br /><br /></li>\n";

for each item you want the menu for. So remove everything you added that is between

?>
all the lines here
<?php

and replace it with 

    echo "<li><a href=\"{$cms['tngpath']}customconfig.php\" class=\"lightlink\">{$text['Mehr Geschichten']}</a><br /><br /></li>\n";

and change the "customconfig.php" to the name of the page, including extrapgs where it's needed, and the Mehr Geschichten in 

{$text['Mehr Geschichten']}

with whatever the variable for the text is. Repeat that  line and make the changes for as many items as you want to appear.

Roger

 

Share this post


Link to post
Share on other sites
pipsi

Roger,

THANK you so much!

I'll try to implement your proposal tomorrow.

Have a good day!
Ingrid

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×