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.