Jump to content

IP page Building menu link and pulling data


Eudemon

Recommended Posts

in page building, without using IPB template

would like to know how to pull menu item from the system

maybe something like this

{foreach menu}

{button}

{end}

also want to know how to pull activity data as well as applying some filter, and pulling the language button

trying looking into documentation and digging in theme, couldn't find it

I know there is an output object, but how do I find the calls that I can use?

Link to comment
Share on other sites

5 hours ago, Eudemon said:

in page building, without using IPB template

would like to know how to pull menu item from the system

maybe something like this

{foreach menu}

{button}

{end}

also want to know how to pull activity data as well as applying some filter, and pulling the language button

trying looking into documentation and digging in theme, couldn't find it

I know there is an output object, but how do I find the calls that I can use?

Not sure if helps but what I done was copied the whole globalTemplate into a new Pages template and removed the bits I do not need

Remember to make sure all your pages are set to use your new template

Link to comment
Share on other sites

I am just building one single page, so not using any template

just tested with globalTemplate, the code that pulls menu items is

{template="navBar" app="core" group="global" params=""}

however, it will just pull all the links including some links i don't want and i can't style each one individually

I know I can just build one menu myself but i want to preserve the language setting

maybe I need to look at what this part stores and build two menu based on the value, any idea?

lang="{expression="\IPS\Member::loggedIn()->language()->bcp47()"}"

 

Link to comment
Share on other sites

16 hours ago, Eudemon said:

maybe I need to look at what this part stores and build two menu based on the value, any idea?


lang="{expression="\IPS\Member::loggedIn()->language()->bcp47()"}"

 

That's the bit that states "lang="eo-US", lang="eo-GB" etc.

If you wanted to create specific content per language then you could use a structure along the lines of

{{if \IPS\Member::loggedIn()->language()->short === 'eo_XX.UTF-8' }}
<p><em>HTML to display for Esperanto</em></p>
{{else}}
<p><em>HTML to display for another language, including English</em></p>
{{endif}}

but probably even better is to create language strings which feature the HTML and then call them in the template.

Link to comment
Share on other sites

this problem might seem noob but

how do I find out what this part returns

\IPS\Member::loggedIn()->language()->short

and how do I call a language string let's say the word "blog" that has key "__api_blog_blogs"

 

Is there any guide for finding out these kind of parameters? I tried digging the forum and documentation but no luck

thanks

Link to comment
Share on other sites

5 hours ago, Eudemon said:

how do I find out what this part returns


\IPS\Member::loggedIn()->language()->short

{expression="\IPS\Member::loggedIn()->language()->short"}

5 hours ago, Eudemon said:

and how do I call a language string let's say the word "blog" that has key "__api_blog_blogs"

{lang="__api_blog_blogs"}

5 hours ago, Eudemon said:

Is there any guide for finding out these kind of parameters? I tried digging the forum and documentation but no luck


Not that I know of. And I've tried looking a lot because I'm totally new to this sort of thing!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...