Blocks that a different of different pages


Author Message
EuroUser

Posted: 7/27/2015
Quote message 

Can anyone suggest a way that I can put different content into blocks on different pages or a way I can code to do this please? I am using the most current version of Artisteer.
 
James G

Posted: 7/27/2015
Quote message 

First of all Joomla and word press allow this by using modules(joomla) or widgets(wordpress).
If you wish to do this in HTML, then give the page a id or class.

This script here will give you page an id.

<script type="text/javascript">
$(function accept(){
$('body').attr('id', 'pg-1-home')
})</script>

In the example above, the script will give the page an id of pg-1-home.
You can name this anything you wish.
If you look at the page code it will look like this:
<body id="pg-1-home">
Lets say your block has a class of bk-1.
css - .bk-1 {display:block;}

So now on the home page lets turn the block off,

#pg-1-home .bk-1 {display:none!important;}

To add this per menu item, in artisteer, right click menu item.
select properties
select add additional html

paste the above script with the modifications.

 
EuroUser

Posted: 7/29/2015
Quote message 

Thank you James G that's a great help!