HI, I want to insert a left hand navigation box into selected pages on the site. The code is the following:
[codebox]<div id="navLeft">
<div id="navLeftHeading">
<MySource_AREA id_name="left_nav_heading" design_area="asset_lineage">
<MySource_SET name="levels_to_print" value="2" />
<MySource_SET name="prefix_with_home_link" value="false" />
<MySource_SET name="suffix_with_current_link" value="false" />
<MySource_SET name="prefix_with_divider" value="false" />
<MySource_SET name="suffix_with_divider" value="false" />
<MySource_ASSET>
<h3 id="<MySource_PRINT var='asset_short_name' />" class="manual_heading"><MySource_PRINT var='asset_short_name' /></h3>
</MySource_ASSET>
<MySource_DIVIDER>
</MySource_DIVIDER>
</MySource_AREA>
</div>
<div id="navLeftBody">
<ul>
<MySource_AREA id_name="left_nav" design_area="menu_stalks">
<MySource_SET name="level" value="2" />
<MySource_SET name="min_num_levels" value="0" />
<MySource_SET name="max_num_levels" value="0" />
<MySource_SET name="alignment" value="left" />
<MySource_SET name="show_stalks" value="false" />
<MySource_SET name="indent" value="0" />
<MySource_SET name="min_height" value="25" />
<MySource_SET name="word_wrap" value="true" />
<MySource_SET name="ellipsis_length" value="0" />
<MySource_SET name="stalk_fg_colour" value="#000000" />
<MySource_SET name="stalk_bg_colour" value="#FFFFFF" />
<MySource_ASSET>
<li>
<a href="<MySource_PRINT var='asset_link' />" class="<MySource_PRINT var='settings.class'/>">
<MySource_PRINT var="asset_short_name" />
</a>
</li>
</MySource_ASSET>
<MySource_DIVIDER> <br /></MySource_DIVIDER>
</MySource_AREA>
</ul>
</div>
</div>[/codebox]
OK I've tried doing it as a design customisation, but that won't work as I don't want it applied to all assets that have that design.
Also, the assets already have a paint layout applied, but if I add this to it as nested content it will then apply to all assets with the paint layout - which I can't do either. Is there a way to apply two separate paint layouts to an asset? I couldn't see how…
When I tried these two things I got the layout OK (from the CSS) but the MySource AREA/ASSET tags were outputed in the HTML so it didn't work anyway - any ideas why this might be (they were live!), or is it that MySource AREA/ASSET tags can't be used in design customisations or paint layouts?
Another option is to just create a separate design which I'm sure will work, however I was trying to avoid this and keep the site to as fewer designs as possible, and just use matrix to add design bits in where I need them. Any ideas how I could get this to work? cheers MAtt
No, you can't apply two different paint layouts for the same URL. You can apply different paint layouts to different URLs though, but I don't think that is going to help you.
[quote]When I tried these two things I got the layout OK (from the CSS) but the MySource AREA/ASSET tags were outputed in the HTML so it didn't work anyway - any ideas why this might be (they were live!), or is it that MySource AREA/ASSET tags can't be used in design customisations or paint layouts?[/quote]
MySource AREA/ASSET tags only work in design parse file.
[quote]Another option is to just create a separate design which I'm sure will work, however I was trying to avoid this and keep the site to as fewer designs as possible, and just use matrix to add design bits in where I need them. Any ideas how I could get this to work?[/quote]
I think a different design applied to these assets is the way to go.
Another option, if you really want this navigation to appear in the same design is to use customisations. Set the design area to print="no" on the customisations you don't want to show, and print="yes" to those that you do.