I've tried a number of ways to get my customIcons to load but currently I am only getting the red pins.... I'm not sure if I've set up the switch / array for customIcons correctly. I am transferring code from v2.
Casadragones
This is the link to the page. The code starts in View Source on line 510.
currently you use wrong labels in customIcons.
change them:
1 to establishment
2 to store
3 to distributor
Related
I've got local tasks displayed as tabs on my users' profile page.
Those local tasks are added by various modules.
I need to change the order of those tabs, and change some of their labels.
I can't figure out how to do that.
I tried using the menu_tokens module to replace those tabs by a real, customizable menu, but unfortunately it's not working correctly in Drupal 9 yet and breaks the whole website. Maybe there's another way which I'm not aware of?
Use hook_local_tasks_alter hook inside your custom module. I've checked and it's still valid in d9.
Inside your module_name.module file place a function named according to the convention function module_name_local_tasks_alter(&$local_tasks) {
Place there a breakpoint or simply var dump the local tasks, you will see, how many local tasks tab goes through this function.
In the end you will find entity.user.canonical, just overwrite the item weight in similar manner:
$local_tasks['entity.user.canonical']['weight'] = -3;
$local_tasks['entity.user.edit_form']['weight'] = -2;
Source: https://codimth.com/blog/web/drupal/how-override-local-task-drupal-8
I'm working on a website with a feature that can sort users.
I'm using mvcgrid.net libs but I can't figure it out. the toolbar doesn't work.
I used most of the basic source codes from mvcgrid.net but when i press something in the search bar it doesn't work or the items per page selection.
If you have specific code to take a look at, please post. Otherwise, here are a few things you can check:
(1) Be sure you've applied the mvcgrid data attributes needed. For example, for a search field you might have these attributes:
<input
type="search"
data-mvcgrid-apply-additional="change"
data-mvcgrid-type="additionalQueryOption"
data-mvcgrid-option="search"
data-mvcgrid-name="ContactGrid">
(2) Be sure the value you chose for mvcgrid-option (in this example, "search") is then added when you configure the grid. For example:
MVCGridDefinitionTable.Add("ContactGrid", new MVCGridBuilder<ContactViewModel>(defaults)
.WithAdditionalQueryOptionNames("Search")
...
(3) You then need to read the attribute (again in the grid config) in your .WithRetrieveDataMethod()
string search = options.GetAdditionalQueryOptionString("search");
I've forgotten step 2 in the past -- that's generally what has tripped me up.
I have a multiple datasets auto-complete implemented using the Bloodhound with default suggestions and second with a remote source.
minLength is set to '0' and so it works for default suggestions on focus, perfectly.
But the request to the remote is also executed on focus and so alongwith the default, second dataset result is also displayed.
How to make sure that the remote dataset is displayed only when the minLength is more than 0. i.e. 1 or more.
I am following along in a book to learn swift and I am building a basic loan calculator for OS-X using XCode. I am getting two errors in my code and it wont allow me to attach the Outlets to my textfields. The errors are:
Line 16 - Use of Undeclared type "NSTestField" but I changed it to NSTextField and it still shows an error under the mistyped var name.
Line 35 - Postfix "." is reserved. The error carrot is on the dot between loanAmountField and doubleValue.
Also, it wont allow me to drag the outlets into my app. I am guessing I did not attach the appdelegate file to the right window since the window option is not marked but I cant figure out how to do that. The book just says it should already be marked.
My code showing errors
(Sorry, I tried using the "code sample" button when posting this but even after indenting 4 spaces and pasting my code it continued to tell me I did not indent.)
The appdelegate showing that "window" isnt marked
I have two blue prints for the space content type in OA. On the toolbar dropdown i want to show only the spaces created using the default blue print. AO uses the oa_core_get_groups_by_user_access(found in OA core module in the oa_core.util.inc file) to pull all spaces a use subscribed to. I want to alter this function to show only spaces created using the default blue print by altering the query used in this function.
All my attempts to do so have failed probably because i don't understand the drupal database abstraction queries. Can someone help me with the piece of code i can add to this function to achieve this functionality.
Finally got it. To show only the default spaces in the dropdown, you have to make changes to the oa_core_get_titles function in the oa_core_util.inc file of oa_core.
Add the following line below line 641 of that particular file.
$query->leftJoin('field_data_field_oa_space_type','t','n.nid=t.entity_id');
$query->condition('t.field_oa_space_type_tid',1);
This filters out only spaces created using the default space.