Formatting hyperlink as a picture in a custom list schema - sharepoint-2007

In my custom list XML I added a few URL fields. one of them has to be displayed as a picture just like when you select "Format URL as: Picture" in the fields settings of the UI.
In the customList's schema.xml I haven't found any place where to override the html markup for a URL type.
Any help or clue is welcome :)
Thanks,
teebot

Try changing the Format property of the relevant fields xml Schema.
Get a copy of SharePoint Manager to try it.
<Field ID="{c29e077d-f466-4d8e-8bbe-72b66c5f205c}" Name="URL"
SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="URL"
Group="Base Columns" Type="URL" DisplayName="URL" ColName="nvarchar3"
RowOrdinal="0" ColName2="nvarchar4" RowOrdinal2="0" Format="Image" Version="1" />

Related

Change field label/string

I'm trying to change field label/string on amount_by_group field that is showing total tax amount on Invoice form.
Tried to do it like this - using field attributes
<xpath expr="//field[#name='amount_by_group']" position="attributes">
<attribute name="string">Porez</attribute>
</xpath>
No luck, also tried to replace field with the same field but with string defined
<xpath expr="//field[#name='amount_by_group']" position="replace">
<field name="amount_by_group" widget="tax-group-custom-field" nolabel="1" colspan="2" attrs="{'invisible': [('amount_tax', '=', 0)]}" string="Tax"/>
</xpath>
I used methods described here (first two points in answer by Cybrosys) https://www.odoo.com/forum/help-1/change-field-label-through-python-149963
Does anybody have clue how to change that fields name? At the moment field label is "Neoporezivo" and I'd like to show it as "Porez".
What you tried is correct. It seems in your case, you have to update field translation.
When we load a new language, Odoo translates terms based on .po file given the folder i18n in the related module.
You can try first from the front end and if it works, you can override .po file.
Try this:
Active developer mode.
Go to Settings > Translations > Translated Terms
Find your displayed term and edit it with your desired term.
Refresh your page and check your form. It should update with the desired term.
EDIT:

TFS Work Item HyperLink from TextBox

Im trying to create a hyperlink on my form that has the URL specified in another field.
I found the Link control which can almost do this, but i dont see a way to configure it use the URL specified in another field.
Something like this might work, but i would have a double https:// in the url.
Is there a way to take a substring of the value so that i can remove the https part ?
Or is there another way to add a link to the work item form that uses the URL from another field.
<Link UrlRoot="https://" UrlPath="{0}">
<Param Index="0" Value="Custom.UrlField" Type="Original"/>
</Link>
Using the HTML field would in theory also be an option, but only if we can hide the HTML buttons and use a small height, this way the URL pasted in this field will become a clickable URL.
No, that's not supported. See Provide help text, hyperlinks, or web content on a work item form
You have to specify the URL directly like this:
<Link UrlRoot="http://www.live.com"></Link>
The syntax to specify a hyperlink with parameters should be like this (See Link and Param XML elements reference):
<Link UrlRoot="http://serverName" UrlPath="sites/{0}/render.aspx?wit=bug&topic=Iteration">
<Param Index="0" Value="System.Project" />
</Link>
That means you need to provide the "http://serverName", only specify "https://" is not working, reference below screenshot.
In your scenario, we can not get the value of another field to set the hyperlink in work item form. There's a Copy Rule for fileds, but it's not available for work item form.
COPY Copies a specified value to a field when a user creates or modifies a work item. See Add a rule to a work item type

How to add a field that link to attachment model?

I have to include a field (paper) to store files in my model (salary) that looks like a hyperlink like if it was a binary. But I don't want it to be a binary stored in my model but to be stored in attachment model as an attachment.
In Knowledge module you can see that it is done, but it is done on itself, as Knowledge is the very module where attachments are stored.
I need to link from my model to attachment model so as the file will be stored in that model but in my model I have to have a field that looks like a hyperlink and when I link on it, I can download the file. As the same time, my field has to behave as a binary field, as I have to load files from it.
It has to work in version 7 and 8
if someone still need it here is the original xml code to create the 'attachment' submenu in 'others' button:
<record model="ir.values" id="ir_action_document_file_directory_form">
<field name="key2" eval="'tree_but_open'"/>
<field name="model" eval="'document.directory'"/>
<field name="name">Browse Files</field>
<field name="value" eval="'ir.actions.act_window,%d'%action_document_file_directory_form"/>
</record>
it is in
addons\document\document_view.xml
Maybe this works for you:
adding another field to create the link
file = fields.Binary("your_file", related='ir.attachment.datas')

Open Search Server: Connect custom html meta tags to schema fields

I've set up a new OSS to handle search on a forum. The basic setup was rather straight forward but upon tweaking it I've gotten stuck. The issue is that the pages have a custom meta tag like this:
<meta name="searchtype" content="construction_collection" />
I have set up a field in my Schema with the same name and then added it to the returned fields in the query. However that tag in the result xml is always empty:
<result name="response" numFound="173" collapsedDocCount="0" start="0" rows="10" maxScore="2357,006" time="6">
<doc score="2357,006" pos="0" docId="4008">
<field name="searchtype"/>
and I fail to comprehend how to setup the Parser and Crawler in order to connect these. Some threads here insinuate that it should work automatically, but it doesn't. Surely I need to set up something more. What have I missed?
/Simon
By default, the HTML parser of OpenSearchServer try to extract only the visible information of the Web page.
It is possible to retrieve information stored in meta only if they use a specific syntax. Your meta should be in the form:
<meta name="opensearchserver.field.searchtype" content="contruction_collection" />
You can also populate several fields:
<meta name="opensearchserver.field.searchtype.anotherfield" content="contruction_collection" />

Joomla URL Additional Get variable broke SEF URLs

I am using Joomla 3, in Menu Item I have created two additional fields called City and County which I manually input the value and its passed as a Get variable to the URL.
In components/com_content/views/article/tmpl/default.xml I have created these two fields.
<field name="City" type="text" default="" label="Enter City ID" description="" size="10" />
<field name="County" type="text" default="" label="Enter County ID" description="" size="10" />
For example normal article URL looks like index.php?option=com_content&view=article&id=22
But when I populate the City and County fields the URL becomes like this index.php?option=com_content&view=article&id=22&City=4&County=1
However, everything seems to work until SEF URL is enabled. But when I enable the SEF URL these additional city and county parameters are not passed and it breaks the whole site.
I have read somewhere this is to do something with router.php and jroute, I am not a programmer and still learning my ropes. Please can someone let me know how I can tell jroute or jrouter to pass these as parameters, I dont want to loose the SEF URLs.
Or if you have alternative method, I will be very greatfull. Thank you for the help.
I have managed to fix this problem by use ArtioSEF JoomSEF plugin. When I use this plugin all SEF and all get parameters are passed as it should.
Thanks

Resources