Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Eudemon Posted February 21, 2016 Posted February 21, 2016 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?
steve00 Posted February 21, 2016 Posted February 21, 2016 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
Eudemon Posted February 21, 2016 Author Posted February 21, 2016 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()"}"
Meddysong Posted February 22, 2016 Posted February 22, 2016 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.
Eudemon Posted February 22, 2016 Author Posted February 22, 2016 thanks for the reply, one concern is i don't know whether this code will reflect on non-logged in guests \IPS\Member::loggedIn()->language()->short === 'eo_XX.UTF-8'
Meddysong Posted February 23, 2016 Posted February 23, 2016 10 hours ago, Eudemon said: thanks for the reply, one concern is i don't know whether this code will reflect on non-logged in guests I had the same fear myself because it looks as though it shouldn't. So I've just logged out and confirmed on a test page on my own site and it's working:
Eudemon Posted February 28, 2016 Author Posted February 28, 2016 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
Meddysong Posted February 28, 2016 Posted February 28, 2016 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!
Eudemon Posted February 28, 2016 Author Posted February 28, 2016 thanks a lot 9 hours ago, Meddysong said: And I've tried looking a lot because I'm totally new to this sort of thing! it seems like they really need to improve their documentation
Recommended Posts
Archived
This topic is now archived and is closed to further replies.