Hiding a section of html in a design customisation

Hi,


I have what seems to be a simple issue that I cant find a simple solution for. I have a design that among other things automatically prints the title of the page at the top using



<h1>%asset_name%</h1>



I would like to set up the parse file so that this title can be turned off in some customisations.



I have tried using a "show if" design area that possibly looks at a declared variable within the customisation but cant get it to work (am unsure how to reference the declared variable from within the show if design area).



I would prefer to just put a design area around the h1 tag and then choose "Print = No" on the customisation but none of the design areas seem to suit the job.



Does anyone have any ideas?



Thanks,



Steve.

[quote]
Hi,



I have what seems to be a simple issue that I cant find a simple solution for. I have a design that among other things automatically prints the title of the page at the top using



<h1>%asset_name%</h1>



I would like to set up the parse file so that this title can be turned off in some customisations.



I have tried using a "show if" design area that possibly looks at a declared variable within the customisation but cant get it to work (am unsure how to reference the declared variable from within the show if design area).



I would prefer to just put a design area around the h1 tag and then choose "Print = No" on the customisation but none of the design areas seem to suit the job.



Does anyone have any ideas?



Thanks,



Steve.

[/quote]



Hi Steve,



I'm interested to see if there's a set solution for this; You could consider a paint layout, but a couple of designs I've seen have these custom elements outside of the page body design area…



For big blocks of HTML, I've used the constant button design area exactly for the purpose you've outlined, it's no doubt entirely the wrong thing to use, but for the life of me I could not get anything else to work the way I wanted it to.



If you are simply hiding or showing the title, then perhaps what you want is a declared var?



<MySource_AREA id_name="show_title" design_area="declared_vars" print="no">

<MySource_DECLARE name="title" value="<h1>%asset_name%</h1>" />

</MySource_AREA>



<MySource_PRINT id_name="page_title" var="title" />



For customizations that don't use the title, customize the var and set it to a blank value.



If that doesn't work, you could always use the same method to hide it using a CSS class… <h1 class="var in here"></h1>

Why not just use a nested content area, then nest in a Standard Page that has your <h1> in it? That way, you can have it print for some customizations, but not for others.


We do this all the time, not in the same exact way, but using the general idea.

Both good responses, thanks.


rugi, I have also used a constant button design area to "kludge" a solution, but like you was not happy to know that I was bastardising an area. Thats why I wrote the post - to come up with a better solution.



Nick, Thats not a bad idea…will give it a go. Wondering if there are any drawbacks to it (I guess I'll find out soon enough).



Thank you both,



Steve.

[quote]
Why not just use a nested content area, then nest in a Standard Page that has your <h1> in it? That way, you can have it print for some customizations, but not for others.



We do this all the time, not in the same exact way, but using the general idea.

[/quote]



I believe the problem in this particular case is that <h1>%asset_name%</h1> in a nest_content will produce the asset name of the page being nested in, and not the asset you're on (for me anyway). But that being said, there might be a keyword kicking around that takes this into account?

[quote]
I believe the problem in this particular case is that <h1>%asset_name%</h1> in a nest_content will produce the asset name of the page being nested in, and not the asset you're on (for me anyway). But that being said, there might be a keyword kicking around that takes this into account?

[/quote]



Yeah, try %globals_asset_name%

Works a treat! Thanks Nic!