0

I want to add sub menu in my blog. I want my menu to be like this (manual testing and automated testing become the sub menu of testing)

  • Testing
    • Manual Testing
    • Automated Testing

There are a lot of tutorials in the internet. However, they are still using the old blogger design where they use <ul> and <li> syntax. In the new blogger (I don't know when it starts), blogger uses JSON for page list management instead of <ul> and <li>.

Followings is the pageListJson from my blog:

<b:widget id='PageList1' locked='false' title='Pages' type='PageList'>
<b:widget-settings>
  <b:widget-setting name='pageListJson'>
    <![CDATA[{'91385535799150449': {'href': 'https://belajarbersama-arwan.blogspot.com/p/belajar-software-testing.html', 
            'title': 'Software Testing', 
            'position': 0}, 
    '4514379653067780013': {'href': 'https://belajarbersama-arwan.blogspot.com/p/manual-testing.html', 
            'title': 'Manual Testing', 
            'position': 1}, 
    '5318229156935072720': {'href': 'https://belajarbersama-arwan.blogspot.com/p/automated-testing.html', 
            'title': 'Automated Testing', 
            'position': 2}}]]>
    </b:widget-setting>
  <b:widget-setting name='homeTitle'>Home</b:widget-setting>
</b:widget-settings>

Using this JSON, the menu appears to be like this:

  • Testing
  • Manual Testing
  • Automated Testing

I tried to modify the JSON to be like this

{'91385535799150449': 
    {'href': 'https://belajarbersama-arwan.blogspot.com/p/belajar-software-testing.html', 
    'title': 'Software Testing', 
    'position': 0, 
    '4514379653067780013': {'href': 'https://belajarbersama-arwan.blogspot.com/p/manual-testing.html', 
            'title': 'Manual Testing', 
            'position': 1}, 
    '5318229156935072720': {'href': 'https://belajarbersama-arwan.blogspot.com/p/automated-testing.html', 
            'title': 'Automated Testing', 
            'position': 2}}}

However, only one menu appear i.e. Software Testing

Can anybody help how can I modify the JSON so I can get the menu structure that I want?

Thank you for your kind helps

1 Answer 1

1

PageList widget not have sub menu, json script just for settings purpose only like title, url and position, not for adding something. You can add manually using ul and li if you want create sub menu for each list.

3
  • Thanks for your help Mainstreem. If that is the case, then I will just add it manually using ul and li. Jul 31, 2017 at 8:50
  • i add <li><ul><li>asdsad</li><li>asdsad</li><li>asdsad</li></ul></li> for testing after </b:loop> but the layout loooks like arrrgh the menu just arrange horizontally like normal, there is no dropdown
    – user9121190
    Apr 24, 2021 at 11:55
  • oh i found how to do that, just go to layout->menu widget, the add nu external link with _ as prefix menu title name
    – user9121190
    Apr 24, 2021 at 12:07

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.