Swapping a single div in a template (SOLVED)
Posted: Sat Jul 12, 2014 2:30 pm
Hello
Would appreciate some advice please!
I am using 1.11.10. and can not solve what seems a simple problem.
http://www.entwurf.plasma-treating.com.
I am at the start of this and am simply getting the basic functions set up. It is still using the sample content from the install.
I have a level 1 top horizontal nav.
When there are children these appear in a vertical nav. This hides where there are no children.
I also have a news/product focus on the right. This is not global as each instance will be different.
This appears only when it contains content
So I normally have either 25% side nav and 75% mian content, or 75% main content and 25% news across my page.
All works well until I get a side nav, main content and news.
All I want to do is switch the CSS width for main content to say 50% minus the gutters.
Tried having a nested template as detailed in http://www.i-do-this.com/blog/Smarty-te ... -Simple/57 . But this just throws up “duplicate content block: content_en” on applying the template as soon as I add
above the head section? So I can't apply this.
I don't even have one "content_en".
The idea was simply a div called smalllcontent in an extension template to swap out the div widecontent to pick up the different CSS.
I have set the background of the right hand column to red just to make it easy to see what is happening when all three are active.
The links “Home”, “How CMSMS works” and “default templates” show up the three conditions.
I want to keep the templates to a min as the site will be translated to Chinese when it is up and running so I don't want to have a second template for this small change.
I will be setting up mobile formatting etc and adding design later.
Thanks
Dave
Would appreciate some advice please!
I am using 1.11.10. and can not solve what seems a simple problem.
http://www.entwurf.plasma-treating.com.
I am at the start of this and am simply getting the basic functions set up. It is still using the sample content from the install.
I have a level 1 top horizontal nav.
When there are children these appear in a vertical nav. This hides where there are no children.
Code: Select all
{menu start_level='2' assign='menu_there'}
{if $menu_there}
<div id="submenu">
<h3>Submenu</h3>
{menu start_level='2'}
</div>
{/if}
This appears only when it contains content
So I normally have either 25% side nav and 75% mian content, or 75% main content and 25% news across my page.
All works well until I get a side nav, main content and news.
All I want to do is switch the CSS width for main content to say 50% minus the gutters.
Tried having a nested template as detailed in http://www.i-do-this.com/blog/Smarty-te ... -Simple/57 . But this just throws up “duplicate content block: content_en” on applying the template as soon as I add
Code: Select all
{block name='small'}
{content assign='main_content'}
{/block}
I don't even have one "content_en".
The idea was simply a div called smalllcontent in an extension template to swap out the div widecontent to pick up the different CSS.
I have set the background of the right hand column to red just to make it easy to see what is happening when all three are active.
The links “Home”, “How CMSMS works” and “default templates” show up the three conditions.
I want to keep the templates to a min as the site will be translated to Chinese when it is up and running so I don't want to have a second template for this small change.
I will be setting up mobile formatting etc and adding design later.
Thanks
Dave