drupal 7 how to add a variable to a node - variables

I would like to be able to add the following to a node
<a id="$variables2" name="$variables2"></a><a id="inline"href="#$variables2">Node title</a>
it is an example . $variables 1 and $variables 2 would be variables from fields added to a specific content type..
It is to integrate fancybox
thank you for your help

You can use hook_load
http://api.drupal.org/api/drupal/modules%21node%21node.api.php/function/hook_load/7

Related

How I can add an ul li list element using an element of WebControls in VisualBasic

I'm working in an old project creating a User Control to add code that will change as I need.
I'd like to add a list element but I only found the property to create list type of <select> using <asp:ListBox, but this is not that I'm looking for
Do you know how generate a <ul><li> elements using Global.System.Web.UI.WebControls? or at least modify its CssClass properties since my VB code. It'd be amazing if I can use a loop to generate the list items.
Thanks in advance
One solution would be to add a BulletedList in your WebForm.aspx:
<asp:BulletedList ID="BulletedList1" runat="server"></asp:BulletedList>
Then in your WebForm.aspx.vb you can add items:
For i As Integer = 1 To 3
BulletedList1.Items.Add("item" & i)
Next
If you inspect your page in a web browser you will see these are equivalent to <ul><li> HTML tags.

How to create Dynamic Xpath for a Tag ? Selenium

Im trying to create 1 dynamic xpath for all 4 a tag which i need store in a List to perform actions. Tomorrow it might be more Locators will be like that.
"//*[#id=\"ctl00_GridView\"]/tbody/tr[17]/td/table/tbody/tr/td[1]/a"
"//*[#id=\"ctl00_GridView\"]/tbody/tr[17]/td/table/tbody/tr/td[2]/a"
"//*[#id=\"ctl00_GridView\"]/tbody/tr[17]/td/table/tbody/tr/td[3]/a"
"//*[#id=\"ctl00_GridView\"]/tbody/tr[17]/td/table/tbody/tr/td[4]/a"
Need help to create dynamic xpath for that. Thank you all.
You could try something like this
row = 1
"//*[#id=\"ctl00_GridView\"]/tbody/tr[17]/td/table/tbody/tr/td[" + row + "]/a"
Then you could just increment/loop over "row" however you wish
use findelements with below locator
"//*[#id=\"ctl00_GridView\"]/tbody/tr[17]/td/table/tbody/tr/td/a"
it finds all td[*]/a elements
First 4.
//*[#id=\"ctl00_GridView\"]/tbody/tr[17]/td/table/tbody/tr/td[position()<5]/a
All td in all trs.
//*[#id=\"ctl00_GridView\"]/tbody/tr[17]/td/table/tbody/tr/td/a

Make Text Field item as Read Only in APEX 5.0

I have some text field page items on my APEX 5.0 page and I want to make the textboxes as read only/non-editable. During the page load I want to use these text boxes for only the data display on the page and should be non-editable.
Can somebody advice on how to do that? What attributes need to set for this?
This answer is a bit late to the party, but I found myself confronted to this problem and I wanted to share the solution I came up with.
In fact you just need to create your item as a text area, let say P1_Text_Area and you give it a readonly attribute using JavaScript. Write thoses 2 lines in the "Function and Global Variable Declaration" of your page:
var disItem = document.getElementById('P1_Text_Area');
disItem.readOnly = true;
Hope this helps someone in need.
in item properties find the
Read Only group
and set Read Only Condition Type as Always
or the option that suits to you
You can use disabled + save session state ==> read only

Custom declarative table in dojo

I have dijit/layout/ContentPane. And I want to place a Table in it. To be exact, I need a table-aligned content with borders.
The table looks like this:
-------------------------------
Header 1 | Value 1 | CheckBox 1
Header 2 | Value 2 | CheckBox 2
Header 3 | Value 3 | CheckBox 3
-------------------------------
Is it possible to create it declaratively (I think, I've checked all possible containers for that) or I should take a Grid and make a storage etc. etc.?
Important point: I need not a data-table. I need a layout container, that will act like regular HTML table and I'll be able to put it inside dojo ContentPane and apply styles.
Try to use dgrid.
You may follow this link http://dgrid.io/
I have been using it until now. It is quite simple to use, and also, it allows you to easily set the scroll-bar, add events on dgrid-select, and many more. Have you learned about dojo store? Please follow this if you haven't: http://dgrid.io/js/dgrid/demos/laboratory/ (you may ignore it if you already have learned about dojo store)...

How can I store a dynamic text value in selenium ide and use it later in different window

I am new in selenium and trying to learning. I am creating a script and I got stuck here, I want to store a dynamic value from text message on web page ex. " Event Name:Test" this Event Name is dynamic and I want to store this and want to get in other window. In 2nd window i want to use this value(Test) to verify in the page
I tried storeValue, StoreText and storeAttribute command and getting error message for xpath or "element not found".
Please help me and advice me , what should I do?
Can You please suggest me the Xpath for storing and retrieving the event name. Please help me...
Thanks in advance,
Niru
If you are using the same test-case to navigate from page 1 to page 2 you can use the storeText function in the IDE to store the value of your event name. And then you can use the same variable in the page 2 for verification.
For example, in page 1 to store the value of event you use:
storeText(locator1, temp)
And then on page 2 you use assert:
assertText(locator2, ${temp})