8 – How to display the first child of a book with the title of the book and keep the url by using a view

Is it possible to display the list of the first child of every book with a view? I couldn’t figure that out so I added boolean to the book content type to check which child is the first child. If that’s not possible I’ll just keep it the way it is, but the main problem is overwriting the the name of the first chapter (keep url) with the name of the book. I wanted to do that with the custom text field, but don’t see the replacement pattern of the book name, so is that even possible?

I’m using Drupal 8.

Thanks in advance!

drupal view

drupal view

I clicked on a Phishing url but I didn’t have password saved, am I at risk?

I clicked on a Phishing url but I didn’t have password saved, am I at risk? – Information Security Stack Exchange

django – How can I change a string on swagger url

This String in particular

(string to change)(1)
(1): https://i.stack.imgur.com/3xn3s.png

Class View

class ServiceProviderBaseUnityAvaliationsView(  mixins.ListModelMixin,

    permission_classes = (permissions.IsAdminUser, )  
    pagination_class = PageNumberPagination
    serializer_class = ServiceProviderBaseUnityAvaliationSerializer 
    queryset = ServiceProviderBaseUnityAvaliation.objects.all()

    def get(self, request, *args, **kwargs):
        return self.list(request, *args, **kwargs)

    def post(self, request, *args, **kwargs):
        return self.create(request, *args, **kwargs)

url rewriting – Why are extensions often hidden on URLs?

This is the type of “cool” URI scheme that I aim for on my own personal website.

Personally, the reason that I started to do so (and probably many more web designer/developers too!) was after reading the article “Cool URIs don’t change” – this document was written by the World Wide Web’s founding father, Tim Berners-Lee.

In Tim Berners-Lee’s famous article, he basically states the same reasons that
Stephen Ostermiller has in his excellent answer to this question.

To give a more specific answer to your main question, “Why extensions are hidden in URLs?” Well, I would say that the main reasons for me are:

1. To future-proof the URI:

For example, it might have sounded like a good idea at the time to use a URI like:
where the .pl being the file exetension for a Perl script. However, thesedays, most web developers use ASP.NET or PHP for backend-scripting, so eve though today,
sounds like a better idea, eventually PHP and ASP/ASP.net will become old-fashioned. So a better idea is to just remove the extension altogether.

2. Readability and Memorability:

It is much easier for a “cool” URI to be passed to people verbally, on paper (e.g. adverts, business cards etc.), not to mention easier to remember.

3. “Hackability” *

Although I’d say that the vast majority of users these days probably go through a search engine for everything – I’ve even seen people who would go to the address bar and type www.google.com, and then use Google to literally type in www.ebay.com! But, I think that if I have a website based on multimedia, the URI http://www.example.com/video hints that the music section can be found under the URI http://www.example.com/audio, and so on. (I still use the address bar to go to websites – I’m fairly “old-school” about that sort of thing!)

*(Oh! “Hackability” – does that word even exist?! Well, it does now!) 🙂

**4. Aesthetics:
To make them look prettier!

However, I have noticed by reading through various SEO-related websites, that a lot of webmasers actually append a file extensions to dynamic URIs, e.g.:

The actual URI may be:

However, the webmaster will perform a rewrite to make the URI “look” static, such as:

The logic behind this is that basically, a search engine will assign a higher ranking to static pages (which are, apparently, less likely to change). (Although I’m not exactly an expert in SEO, I personally don’t buy into this idea myself – I’m guesing that with the kind of minds behind Google and Bing’s algorithms, it will take slightly more than a fake file extension to con your way you into SERP pole position!)

For more information on naming URIs, I recommend reading these articles:

Tim Berners-Lee:

W3C QA Tips:

Brian Kelly (UK Web Focus / UKOLN – University of Bath):

Hope this helps!

magento2 – Url parameter in magento 2 collection filter

I need to filter Magento 2 custom grid model collection by URL parameter. I have used this below code.

protected function _initSelect() {        

        $objectManager = MagentoFrameworkAppObjectManager::getInstance();  
        $request = $objectManager->get('MagentoFrameworkAppRequestHttp');  
        $seller_id = $request->getParam('seller_id');

        $this->addFilterToMap('increment_id', 'main_table.increment_id');
        $this->addFilterToMap('status', 'main_table.status');
        $this->addFilterToMap('seller_id', 'main_table.seller_id');
        $this->addFieldToFilter('seller_id', ('eq' => $seller_id));
            ('secondTable' => $this->getTable('sales_order_grid')), //2nd table name by which you want to join mail table
            'main_table.order_id = secondTable.entity_id', // common column which available in both table 
            '*' // '*' define that you want all column of 2nd table. if you want some particular column then you can define as ('column1','column2')
         //$this->addFieldToFilter('main_table.seller_id', ('eq' => '39'));

        // var_dump($this->getSelect()->__toString());
        // exit;

        return $this;        

When I log this seller_id it is showing by when I pass in filter not working. it is working when I pass a static value. I’m not sure how to filter a collection by param in the model.

nodes – How to embed image field url in API response?

I have a content type that has a title, body, link, and image field.
Then in my php file I have the following:

$articles = Drupal::entityTypeManager()->getStorage('node')->loadByProperties(('type' => 'expand_your_world', 'status' => 1));

When I check the articles variable in a JSON response, I only see the title, body, and link.

I then concluded that probably the reason why the image is not included, is because it is a reference field.

My get method looks like this:

$articles = Drupal::entityTypeManager()->getStorage('node')->loadByProperties(('type' => 'expand_your_world', 'status' => 1));

$main_content = ();

foreach($articles as $article) {
    $fields = (
        'title' => $article->title(0)->value,
        'body' => $article->body(0)->value,
        'field_expand_link' => $article->field_expand_link(0)->uri,
        'field_expand_icon' => '',

    array_push($main_content, $fields);


$response = (
    'content' => $articles,

How do I embed the image URL in the response?

I want to replace an URL in Google Sheets as a personalized hyperlink in my Google Docs body

I have a link in one of the Google Sheets cells like this:

I know how to attach it to the Google Docs body through the following steps:

const body = doc.getBody();

This gives me the result you can watch here:

but I would like to have this result instead:

So, how can I do this? Any help will be appreciated!

Redirect query string URL via .htaccess

I am trying to redirect all query strings to a new URL.

Search query example www.example.com/?s=cars to resolve to www.example.com/?search_gcse/?q=cars (“cars” is just an example).

What is the syntax for the .htaccess rule?

How to import images from the external URL in Magento2

After Adding this code

    $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); 
     $currentStore = $storeManager->getStore();

    $mediaUrl = $currentStore->getBaseUrl(MagentoFrameworkUrlInterface::URL_TYPE_MEDIA);
    $storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface'); 
    $currentStore = $storeManager->getStore();
    $image_url  = $importData('addtional_image'); 
    $image_type = substr(strrchr($image_url,"."),1); 
    $filename   = md5($image_url .$image_type;
    $filepath   = $mediaUrl . $filename;
    file_put_contents($filepath, file_get_contents(trim($image_url))); 
    $mediaAttribute = array (

Facing the issue failed to open stream: HTTP wrapper does not support writeable connections

authentication – Does sending hashed password over url path parameter secure?

I need to create WebSocket authentication mechanism without using ticketing or cookies, so the whole authentication needs to be performed via HTTP (over SSL) GET request which is sent to upgrade connection to WebSocket (code snippet used to handle upgrade in NodeJS).

The problem lays in GET request which is not supposed to be used in authentication (mentioned here and here). I would need to send password via path or query parameters in URL e.g. wss://example.com/username/password123 and then validate it on server side.

My idea is to encrypt the password on client side with Argon2 (using salt) and then send it with WebSocket upgrade request (GET) over HTTPS as url path parameter to the server which will validate it with database entry. I know that this question is similar to this one, but it doesn’t cover password encryption. Is that enough to say that it’s a good and secure approach?

Thanks for help.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123