problem in using the url data type in a combo box

Author Message

M M

Sunday 16 January 2005 6:01:40 am

HI all

i'm really in a big problem concerning the url data type

My problem is that i need to fetch the second part of the datatype meaning that it contains a place to enter the url itself and another place to enter its description ...
what i need is to deal with the part of the url only [ i'm using it in a combobox]

here is my example:

<form name="form1" method="post" action="">

{let startNode=125 ministries=fetch('content','list',hash('parent_node_id',$startNode))}

<select class="selectMinistry" name="selectMinistry" id="selectMinistry" onChange="jumptolink(document.form1.select1)">

<option selected value=""> {'Al-Madina Government Sites'i18n('design/ar')}</option>

{section var=ministry loop=$ministries}

<option value="{attribute_view_gui attribute=$ministry.data_map.web_site}" target="newwin">{$ministry.name}</option>

{/section}

</select>

{/let}

So i need the second option to have a value of the url of the object so as to be when transferred to html as the following:

<option value="href="http://myurl.com>the url's description" target="newwin">the object's name</option>

while the situation now is as follows and it's not right at all

<option value="<a href="http://myurl.com">the url's description</a>" target="newwin">the object's name </option>

Kristian Hole

Monday 17 January 2005 12:38:55 pm

Try

{$ministry.data_map.web_site|attribute(show)}

This shows that you can use:

<option value="{$ministry.data_map.web_site.content}" target="newwin">{$ministry.name}</option>

Enjoy! :)

Kristian

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

M M

Monday 24 January 2005 5:32:54 am

Thanks so much Kristian, it works...........

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 31 2025 06:27:37
Script start
Timing: Jan 31 2025 06:27:37
Module start 'layout'
Timing: Jan 31 2025 06:27:37
Module start 'content'
Timing: Jan 31 2025 06:27:37
Module end 'content'
Timing: Jan 31 2025 06:27:37
Script end

Main resources:

Total runtime0.0162 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.0047 588.2813151.2266
Module start 'layout' 0.00470.0016 739.507836.6797
Module start 'content' 0.00630.0087 776.187590.3125
Module end 'content' 0.01510.0011 866.500033.9922
Script end 0.0161  900.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002012.5216140.0001
Check MTime0.00095.6263140.0001
Mysql Total
Database connection0.00095.366610.0009
Mysqli_queries0.001710.336330.0006
Looping result0.00000.062010.0000
Template Total0.00085.010.0008
Template load0.00063.985510.0006
Template processing0.00021.046210.0002
Override
Cache load0.00052.797710.0005
General
dbfile0.00117.079780.0001
String conversion0.00000.035440.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