Paint layouts keywords


#1

Hi Guys,

 

Is there any way at all to print the contents of div containers rather then the whole page contents.

 

What I have is a paint  layout and I would like users to create new containers with specific ids. So I can really control the format of the page. The format will be repetitive.

 

so printing for example -

 

<p> %asset_metadata_description%</p> <h2> Show me where </h2>
%asset_contents_where%
<h2> Show me how </h2>
%asset_contents_how%
<h2> Teach me more </h2>
%asset_contents_more%

 

Or is it better to asset list the contents

 


(Bart Banda) #2

Yea I would probably use an asset listing of the bodycopy divs.

 

Alternatively, you can have each of those content boxes as metadata wysiwyg fields and the let the editors edit the content on the metadata screen, then simply use the paint layout to format it in any way you want. 


(Robin Shi) #3

If your user has limited skills about mark up, using WYSIWYG will be troublesome. The keyword %asset_contents_where% has no guarantee to print the wrapped tag hence the HTML may not be valid. I used the way Bart suggested but only allowed the user to input plain texts.


#4

Thanks guys for your help! So stealthy !


(Anthony) #5

I make huge use of metadata so I'd def suggest going that way. It gives you so much more scope to re-use that data in other ways - using other paint layouts or asset list to show the data in tabular format, sort in different ways etc, none of which would be possible if it was just content div's.

 

One tip I use a lot is that the "data record" asset type is a very lightweight asset - basically an empty shell that just has the basics like name, web path etc - and then you can associate any metadata schema you like to hold all the real data. I notice your first question is "where"... in my site I have data record assets representing venues and the metadata schema includes things like the address, map reference etc etc... and because all that is metadata I can do cool stuff like have an asset list that populates a google map with all the venues (the metadata field on the main asset is a related asset type field so it holds the ID of the venue (data record) asset). So in my case the "where" that you put %asset_contents_where% would actually be something like %asset_metadata_venue^as_asset:asset_metadata_addressline1%... etc

 

Good luck


#6

Thanks so much Anthony! you guys have convinced me meta is the way to go!