-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xbootstrap theme and slider #193
Comments
Very good question. That seems inconsistent. It probably would be best to add a 'xoops_startpage' assign in \xos_opal_Theme::xoInit() so the theme could make the decision? It could default to 'system' as well. Also, should add the assign to redirect_header() for consistency. Sounds like that would be a good upgrade. Do you have any ideas? I would be happy to hear any alternatives. |
I think it's a good idea to put the variable 'xoops_startpage' assign in \xos_opal_Theme::xoInit(). How can we know if we are on the home page? use $_SERVER['PHP_SELF']? |
We could assign the config value for startpage to xoops_startpage, and assign xoops_script from the My first thought was xoops_requesturi would work, but it would take a lot of code to process in the template, since siteurl/ and siteurl/index.php both refer to 'home.'
That leaves us with That should make it easy to adapt as needed in the templates with no parsing or multiple values to check. Would that work? I also considered setting a $xoops_default_page variable as a boolean instead of using xoops_script might be simpler and cleaner. I am leaning toward the xoops_script, since it provides data to the presentation layer, so the logic stays in the templates, while the xoops_default_page idea makes a presentation decision and passes it to the template. But, either one would work. |
We already have it in System's preloads this: if (is_object($GLOBALS['xoopsTpl'])) {
$GLOBALS['xoopsTpl']->assign('homepage', true);
} So XOOPS can assign "$homepage", which then I can test in the theme to either assign the "one page" part of the theme, or the "module part":
see the discussion in: http://xoops.org/modules/news/article.php?storyid=6734 Could we use this approach? |
Insraq also discussed this issue in his book "Design for XOOPS": https://goo.gl/DByanU |
I forgot that was there, but this approach solves a larger set of issues, so it would be more flexible.
The $xoops_default_page variable IS your $homepage. Consider this example. Right now, with xBootstrap, it triggers off of These issues are in addition to the problem of the carousel not showing on the landing page when you change the startpage. I was actually considering the one page themes when I made this suggestion. Being able to interrogate both module and script in a standard way opens things up. Right now the one page themes are strapped on, not integrated to XOOPS. With this, in addition to a cool landing, you could for example do something special to target just the onboarding (registration) with a cool slick process, because you could target just that page. Instead of making just one controllable page, this makes them all individually controllable. This is a superset, and what you already did could be readily accommodated. We can keep the $homepage variable (but maybe move its setup to the environment setup in xoInit().) But the longer I think about it, the more value I see in the proposed new variables. There are more things needed, like some more flexibility with blocks and placement, like some things Eduardo is doing in RMCommon, but this would be a step forward all on its own. |
I am fine with whatever is more generic and flexible :) |
Me too! |
OK! @GregMage can you take this one? |
Ok, I'll make a proposal. I can create a variable $xoops_page with more values. I use $_SERVER['SCRIPT_NAME'] to fill the variable $xoops_page. The variable is initialized in xoInit(). I think it is simple and flexible. what do you think? |
A first version: #197 Finally I use $_SERVER['SCRIPT_FILENAME'] |
Hi, same $xoops_page. |
When a module is on the home page, the slider is not displayed.
`<{if $xoops_dirname == "system"}>
The text was updated successfully, but these errors were encountered: