Skip to main content
#! code
Main navigation
Articles
Snippets
Tools
About
Contact
User account menu
Log in
Breadcrumb
Home
Search Results
Search Results
Article
Posted: 16 Apr 2023
Drupal 10: Using Parameter Converters To Create Paths For Custom Entities
… item of content. This system creates powerful search engine friendly
URL
s that can add keywords to the paths that Drupal uses to find … ->setLabel(t('Slug')) ->setDescription(t('The
url
slug of the entity.')); return $fields; } } Note the addition of … definitions. This will be used to store the name of this entity as a
URL
safe string that we can use to convert back into the entity object …
Article
Posted: 12 Jul 2010
Custom Post Types In WordPress 3.0
… the Comments menu item. 'menu_position' => 30 menu_icon This is a
URL
to the image that will be used when your menu item is added to the … you might do something like the following. 'menu_icon' => WP_CONTENT_
URL
. '/plugins/' . plugin_basename(dirname(__FILE__)) . … rewrite Set this setting to false to prevent rewriting the
URL
of your custom content types. This setting can take an associative …
Snippet
Posted: 20 Jan 2023
Drupal 7: SQL Query To Print A List Of The URL Alias Created For Nodes And Users
… IS NOT NULL THEN n.type ELSE 'user' END AS 'type', ua.alias FROM
url
_alias ua LEFT JOIN node n ON n.nid = REPLACE(ua.source, 'node/', … Drupal 7: SQL Query To Print A List Of The
URL
Alias Created For Nodes And Users …
Article
Posted: 18 Aug 2024
Drupal 11: An Introduction To Batch Processing With The Batch API
… page and by default will include the core/drupal.batch library. set
Url
Options() - Sets options that will be added to the redirect
URL
s. setProgressive() - This setting changes the batch to run … the form submission back to the form itself. $form_state->setRedirect
Url
(new
Url
($this->getFormId())); } As this is a form operation we can …
Article
Posted: 21 Dec 2025
Drupal 11: Controlling LED Lights Using A REST Service
… the colour of the LED lights. What I needed to do was update the
URL
used, and reduce the amount of time between updates. This is just a case of altering the
URL
variable in the script.
URL
= "https://www.hashbangcode.com/plasma/[REDACTED]" Our custom JSON …
Article
Posted: 15 Feb 2010
Using Authentication And file_get_contents()
… remote file and is usually run like this. $data = file_get_contents($
url
); However, when trying to use this function to communicate with an … base64_encode("$username:$password") ) )); $data = file_get_contents($
url
, false, $context); The second parameter is for the addition of a …
Article
Posted: 4 Sep 2009
Google Last Cached Date Finder In PHP
… run a Google search and look at the Cached link next to the green
URL
text of the result. When you view the cached page Google will also … here. The class works by constructing a query string with a given
URL
, which it then uses to download the cached page from Google. It …
Article
Posted: 25 Feb 2008
Apache Bench Tool
… Bench tool. The simplest form of running the tool is to use a single
URL
. However, you must enter a full file name or the tool will give you an invalid
URL
error. ab http://www.google.com/index.html This gives the following …
Article
Posted: 22 May 2008
HTML Meta Refresh
… to make the browser refresh to another page by including the string:
url
=
url
or filename Within the content attribute. Here is an example that … after a 5 second delay. <meta http-equiv="refresh" content="5;
url
=http://www.google.com" /> …
Snippet
Posted: 10 Apr 2025
Drupal 11: Wrapping A Link In A HTML Element
… 'p', 'child' => [ '#type' => 'link', '#title' => $this->t("Home."), '#
url
' =>
Url
::fromRoute('<front>'), ], ]; This will render something like this: …
Pagination
First page
« First
Previous page
‹‹
…
Page
5
Page
6
Page
7
Page
8
Current page
9
Page
10
Page
11
Page
12
Page
13
…
Next page
››
Last page
Last »