Show-hide locator

About the template and stylesheet - and changing the menu
Post Reply
Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Show-hide locator

Post by Tata » Wed Mar 16, 2016 8:19 am

It is sure not difficult and I did it before. But rightnow I can't finde the right template. I want to use a locator on the webpage. But not visible on each page. E.g. I don't need it on the welcome page. I remember using it with

Code: Select all

<div class="<?php echo $locator;?><?php echo locator();?></div>
and classes "show/hide" defined with "display: block/none" in stylesheet. The scriptin was then used on respective pages defining the status of a locator. But now I do something wrong.
I usein template:

Code: Select all

     <div id="menu">
          <?php echo li($hc, 1);?>
     </div>
Any suggestion?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Show-hide locator

Post by cmb » Wed Mar 16, 2016 9:08 am

Are you looking for something like the following?

Code: Select all

<div class="<?php echo $locator;?>"><?php echo locator();?></div>
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Show-hide locator

Post by Tata » Wed Mar 16, 2016 10:25 am

Exactly, that's it. I just don't remember how to use it on the pages.
Shall it be?

Code: Select all

#cmsimple $locator="hide";#  
I tried this, but it didn't work.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Show-hide locator

Post by cmb » Wed Mar 16, 2016 11:43 am

Yes, that is supposed to work. If it doesn't work in your case, I suggest you check the generated HTML source code for the desired result.
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Show-hide locator

Post by Tata » Wed Mar 16, 2016 4:07 pm

I have found it. The problem was in nested DIVs and thus wrongly used classes. Now it works. The template is almost ready.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply