inline attribute_view_gui?

Author Message

David Jones

Thursday 10 August 2006 7:21:01 am

I want to use "attribute_view_gui" inline.

For example

<meta name="keywords" content="{attribute_view_gui attribute=$node.object.data_map.search_engine_keywords}" />

<i>*above all on one line*</i>

Produces

<meta name="keywords" content="
Keyword1, Keyword2, Keyword3" />

I would like it to produce

<meta name="keywords" content="Keyword1, Keyword2, Keyword3" />

i.e. all on one line.

Any ideas?

Fabricio Guerrero

Thursday 10 August 2006 8:32:22 am

well.. the simplest answer would be to say to create an override for that line view.

find out which line view your using and customize it to your liking.

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

David Jones

Thursday 10 August 2006 8:56:47 am

Thanks...

How do I find that out?

Fabricio Guerrero

Thursday 10 August 2006 9:13:49 am

well... once again i would say the easiest way would be to go into your sites admin

http://your_site/index.php/ursite_admin/

There you can view a right hand tool bar called quick settings.

1. Choose "Template debug" and "Inline template debug" +
2. make sure the siteaccess dropdown is set to your front site
3. Click Set (you might also need to clear cache depending on your settings)

Now on your front site you should be able to see all the templates that are being used. This way you can pinpoint the template(line view) your after and create an override for it.

you might need to read on overrides: http://ez.no/doc/ez_publish/technical_manual/3_6/templates/the_template_override_system/template_override_example

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

David Jones

Thursday 10 August 2006 9:23:22 am

I thought that was how it was supposed to work.

Unfortunately it claims that I am only using 3 templates.

None mention a line view and I'm guessing that the last 2 just deal with the debug out put.

pagelayout.tpl
setup/debug_toolbar.tpl
setup/quick_settings.tpl

Thanks

Kristian Hole

Thursday 10 August 2006 9:41:22 am

Too increase the speed of your page, the content-view is cached (with the view-caching).

This means that the content is not generated everytime you load the page, and it will not show you all the templates either (since they are not used).

If you clear the content/viewcache it will regenerate the cache on the next load of the page, and then you will se which templates that are used.

Cheers,
Kristain

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

David Jones

Thursday 10 August 2006 10:18:50 am

There is still no mention of a line view.

Kristian Hole

Friday 11 August 2006 8:54:21 am

Hi David,

When i read your post again, i see that you have view-cache disabled, since $node is available in your pagelayout. This is a bug, because $node should actually not be available there. And it will not if you switch viewcache back on for better performance. The best option is to fetch the content based on the $module_result.node_id.

When using the attribute_view_gui command it will show up as "content/datatype/view/ezkeyword.tpl" if you are showing a keyword datatype.

To get it exactly the way you cant it, you can use the same code as in the datatype template, example:

<meta name="keywords" content="{$node.object.data_map.search_engine_keywords.content.keyword_string|wash}" />

This should not generate any pagebreaks.

The version that works with view-caching will look something like this

{if $module_result.node_id}
 {def $keyword_node=fetch(content,node,hash('node_id',$module_result.node_id)}
  <meta name="keywords" content="{$keyword_node.object.data_map.search_engine_keywords.content.keyword_string|wash}" />
{else}
  <meta name="keywords" content="Generic keywords" />
{/if}

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 21 2025 16:10:08
Script start
Timing: Jan 21 2025 16:10:08
Module start 'layout'
Timing: Jan 21 2025 16:10:08
Module start 'content'
Timing: Jan 21 2025 16:10:08
Module end 'content'
Timing: Jan 21 2025 16:10:08
Script end

Main resources:

Total runtime0.0167 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.0313151.2109
Module start 'layout' 0.00530.0030 740.242236.6484
Module start 'content' 0.00830.0066 776.8906102.2656
Module end 'content' 0.01500.0017 879.156341.9922
Script end 0.0167  921.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002414.3372140.0002
Check MTime0.00106.2371140.0001
Mysql Total
Database connection0.00084.594910.0008
Mysqli_queries0.003118.574530.0010
Looping result0.00000.095410.0000
Template Total0.00138.010.0013
Template load0.00106.003510.0010
Template processing0.00031.995510.0003
Override
Cache load0.00074.176110.0007
General
dbfile0.002112.666580.0003
String conversion0.00000.052740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs