Is the block returning something (like markup), even when there aren't any results? Generally, if $block.content is empty, the block will not display
Is there a way that I can make a block hide itself if it has not contents? Say I have a 'recent articles' block, which can be filtered by tag. For some tags, there are no articles, but the title of the block still displays.
What I would like to happen is, if there is no content in a block, it does not display the block title or anything else. It just doesn't display.
I've tried setting $block['title'] = '', or not returning $block, but the title still shows up.
Any ideas?
Thanks! It's a little module that needs some TLC, I agree. Lots of small improvements possible. I'll have a look at doing some of them on a regular basis, and starting a more regular flow of releases.
Don't hesitate if you have some needs or proposals that you'd like to see added
Ok I had a look, that's a great module actually, it should be developed further :)
Ok thanks, I will check out the module.
hehe, @skenow is no fan of those image rotators either, but it's part of what some people expect nowadays.
I created a module called 'billboard' some time ago that allows you to add an image rotator to your site. It needs some work to get it up-to-date on the level of functionality and javascript library. I never had requests for a specific functionality, so I stopped working on it. If you are interested, I could spend some time into adding stuff. Let me know.
When it comes to themes with the functionality hardcoded : http://themes.impresscms.es/ should have some options for you.
Hello, Javascript Idiot here. Can someone please recommend a theme that has one of those image slideshows built into the header? I would like a good example to study the code, but I have no idea what constitutes a good example.
The powers that be have dictated that having lots of huge photos zipping past is more important than, say, actually being able to load the page. You know how it is.
Got it!
I had moved the form from its original location (just left of the menu items) to the right side. Changed the class to navbar-right and it is doing as I want it to.
I'm still wondering about the different uses of elements for the dropdown - a list item for the login and a div for the user menu. Any thoughts?
The search form is after all the attached code, starting immediately after the last IF closure. It's common for both instances, so something is shifting it or the login/user dropdown (most likely, since this is where the differences are.
Hi Steve,
the first code doesn't seem to include the search field declaration, so I'm not sure. My guess would be that the search field is declared first in the logged out portion of the site, and last in the logged-in portion of the theme.
I've been working on a new theme for a site based on icmsbootstrap3 and have the following tweak to make - the position of the search field changes after logging in and I'd like it to be the same as the logged out position.
Looking at theme.html, the button & dropdown are constructed differently.
Logged out (just uses a li and a b element):
The theme is basically the theme from our company, written by QM-B. I spent a lot of time today to figure out. The main problem was a lot of arrays, which can be created easily in smarty 3. Within the theme he has several arrays in a function, but associative arrays which cannot simple be created in pure smarty 2. So currently I am using the php tag, which allows me to build the array in PHP. Not a nice solution and it blows up the theme, but the most easiest way I found. If you have a better idea, I would be glad to hear.
Easier was the solution I found for tags like
we are currently still using Smarty 2, and as far as I know, nobody has been working on a migration to another theme engine (Smarty 3, Twig, ...).
Hi Karl,
we are currently still using Smarty 2, and as far as I know, nobody has been working on a migration to another theme engine (Smarty 3, Twig, ...).
The difficulty of such a task is that ImpressCMS (and Xoops before it) are using some Smarty 2 functionalities as part of the base system, such as caching. Smarty is very much woven into the system, so it is a big task to untangle it.
Until now, there was no real demand for a change, as there is much improvement that can be made by simply using smarty in a smarter way
Mr.Theme's work for ImpressCMS 2.0 (and here) demonstrates that very nicely.
To get to your question : it depends on what specific Smarty 3 stuff you are using. If it's a theme that is described or available on the Internet, we could give a look into it and let you know. In most cases, themes don't use many specific smarty elements, so converting a HTML5/CSS theme to an ImpresssCMS theme shouldn't be too hard.
Not sure if the forum is the right one. I have some trouble with my templates and the "old" smarty inside. In the german forum Rene told me, that I have some custom Smarty features, which I can currently not use, since I haven't the plugin. Ok, I removed them. But in some Templates I still have troubles. After a long time of Google Searches, I found, that my Smarty is in Smarty 3, but not compatible with Smarty 2.
Now the question: Is there any way to re-enable Smarty 3 in Impress? Or would it be faster to use a new theme?
Cheers, Karl
I wonder if that would be useful in combination with symlinks, extending what you can do with symlinks that way
;)
this works in both directions, of course. You can make it like
if (*smarty* != *sitename) than make *yourstandard.css*
Hi Chris,
that's nice Smarty template kung-fu there. I hadn't thought of it that way, very nice.
Thanks for sharing!
Hi there,
try this:
I have a single page I want to display in an I frame but I need it to have it's own style, not the global style. Is there an easy way to do this?