Creating an exhibition format to hide the menu.

Ezio / 2012-10-14 14:27:22   

Hello everyone !

Starting from the "no-show" format on a portfolio I wish to start from scratch, alightsociety.com, I was wondering why inputting the specific css code to hide the new index div was not working properly.

Below you will find the code I'm attempting to put in a specific exhibition format:

  1. class Exhibit
  2. {
  3. function createExhibit()
  4. {
  5. $OBJ =& get_instance();

$OBJ->page->exhibit['exhibit'] = $OBJ->vars->exhibit['content'];
return $OBJ->page->exhibit['exhibit'];
}
}

function dynamicCSS()
{
return "#index {display:none;}";
}

Would you by any chance have an idea about this ?

Cheers,

Baptiste

Vaska A / 2012-10-15 13:06:41   

I'm not quite sure what you are doing. The above code isn't really CSS (except that one line).

It would be better to approach this by making a custom theme or a plugin that shows/hides the index. Placing this code into the template directly is not the way to go about this.

Ezio / 2012-10-15 15:40:12   

Well I didn't explain things clearly, I apologize.

There was a beautiful method in the first indexhibit that enabled custom css to be applied on certain exhibition formats through the dynamicCSS() function at the end of every php exhibition format file.

I wonder why adding css in this portion of an exhibition format and activating it on an exhibit doesn't render the css part.

Ezio / 2012-10-15 15:42:29   

The idea behind this is to be able to apply a specific css to each exhibit. Currently I work by inputting

and

in the exhibits text fields, and desactivating the text processing. But I'm sure a more elegant solution exists.

Ezio / 2012-10-15 15:43:05   
  1. <link rel="stylesheet" href="alightsociety.com/ndxzsite/css/home.css" type="text/….
Vaska A / 2012-10-15 15:48:19   

Because, all you are doing is creating a function - it's never called in the script so nothing happens. If you want to enact CSS only for use with the Visual Index format you can do this...like:

  1. body.format-visual_index #index { display: none; }

Very simple this way...

Or, another way is to make a new template set that simply doesn't even have the #index.

This thread has been closed, thank you.