views – How do I get the file path of a document?

I’m using views-view-fields.html.twig to display content. I can print the file name using fields.field_module_field_name.content, but the code below outputs not only the file name, but also the path to where it’s stored (It also displays the other fields in the module). I’m trying to take the path and set it as an href to the document for viewing/downloading.

I was tasked to complete this module.Everything about it is dynamic, so I need to be as generic as possible. Let me know how if more information is needed. I’ll try my best to provide them.

{% for field in fields -%}
  {{ field.separator }}
  {%- if field.wrapper_element -%}
    <{{ field.wrapper_element }}{{ field.wrapper_attributes }}>
  {%- endif %}
  {%- if field.label -%}
    {%- if field.label_element -%}
      <{{ field.label_element }}{{ field.label_attributes }}>{{ field.label }}{{ field.label_suffix }}</{{ field.label_element }}>
    {%- else -%}
      {{ field.label }}{{ field.label_suffix }}
    {%- endif %}
  {%- endif %}
  {%- if field.element_type -%}
    <{{ field.element_type }}{{ field.element_attributes }}>{{ field.content }}</{{ field.element_type }}>
  {%- else -%}
    {{ field.content }}
  {%- endif %}
  {%- if field.wrapper_element -%}
    </{{ field.wrapper_element }}>
  {%- endif %}
{%- endfor %}

Sample output above would be in the following format.

status, title, date and time, file name, file path

sharepoint server – Update Document Library Title Using REST

I am trying to update the Title of an existing document library using REST but getting this error

The parameter __metadata does not exist in method GetByTitle.

my REST endpoint is


and also tried


Payload is

"__metadata": {
"type": "SP.List"
"Title": "Rest Test Library"

headers are

enter image description here

Apache not reading correct document root folder


Apache not reading correct document root folder | Web Hosting Talk
var sidebar_align = ‘right’;
var content_container_margin = parseInt(‘350px’);
var sidebar_width = parseInt(‘330px’);

  1. Apache not reading correct document root folder

    Apache shows default page and doesn’t load site configuration. OS: Debian 10. Site is enabled but somehow it doesn’t show files from public_html folder.. It still shows default html page from /var/www folder. Any help is appreciated.


    <VirtualHost *:443>
    SSLEngine On
    ServerAlias *
    DocumentRoot /home/xx/public_html
    SSLEngine on
    SSLCertificateFile    /home/xx/ssl.cert
    SSLCertificateKeyFile /home/xx/ssl.key
    <Directory /home/xx/public_html>
    Require all granted
    ErrorLog /home/xx/logs/error.log
    CustomLog /home/xx/logs/access.log common
    LogLevel debug

Similar Threads

  1. Replies: 0

    Last Post: 04-24-2015, 01:27 PM

  2. Replies: 3

    Last Post: 12-25-2014, 01:51 AM

  3. Replies: 9

    Last Post: 05-06-2010, 02:44 AM

  4. Replies: 13

    Last Post: 01-04-2007, 10:14 PM

  5. Replies: 4

    Last Post: 02-10-2004, 10:35 PM
Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

How to change “Foxitreader Document” to normal PDF format?

I am using Ubuntu 18.04 LTS version.Few days ago I have installed FoxitReader through terminal but due to some reasons I have uninstalled it but now when I download PDF file from internet it default shows “FoxitReader Document” type instead of “PDF document” and since I have uninstalled FoxitReader, I can’t open such files with Okular or Document Viewer so can anyone please help me??

I want to change all files to PDF document files and I don’t want to install FoxitReader again.enter image description here

document library – Hide the Approve/Reject button in AllItems.aspx in SharePoint Online

I would like to hide the menu item in a document library that reads “Approve/Reject”, since approval is being managed by a workflow that I created. Most online articles tell the solution to this issue is adding custom CSS to the page so I am trying this method. I have opened the page ~/AllItems.aspx in SharePoint Designer.

Upon inspecting the HTML for the page in my browser, I found the html for that button:

enter image description here

I tried editing AllItems.aspx as follows but the button would not disappear:

enter image description here

Can someone please give a full, working explanation of how I might achieve hiding this button?

file recovery – Open a (recovered) Microsoft Word document from 14 years ago

I have a Microsoft Word document that I wrote 14 years ago (in 2006), it is text-only.
I do not remember which version of Microsoft Word I was using to write it, but the OS was Windows XP (in a different language that my current PC), and the file extension is “.doc”.
I changed computers several times since then, but always kept that file in some HDDs.

Now I want to read this document again.
I plugged my external HDD to my current computer (Windows 10) ; and Explorer tells me that the file type is “Microsoft Word 97 – 2003 Document”.
On my PC I have the “Word App” installed (not sure which version that means ; it is installed in “C:Program FilesMicrosoft OfficerootOffice16WINWORD.EXE”).

When I try to open my .doc file with this version of Word, I get this message box:

enter image description here

I tried several encodings but the text preview was always garbled.
I remember that 10 years ago (in 2010) my laptop crashed, I brought it to a shop that salvaged its disk, I think this file was one of the retrieved data.

Is there any way I can read the contents of my document again?

sharepoint online – Extract the Name of the uploaded file in document library into another column

You cannot use a calculated column with the name column. You can build a designer workflow that runs on item creation and update the columns with data extracted from file name.

Alternatively, as you seem to be using SharePoint online you can also build a Microsoft flow to do the same.

enter image description here

To extract the first part I used the expression

substring(triggerBody()?('{Name}'), 0, lastIndexOf(triggerBody()?('{Name}'),'-'))

For the second part I used an expression

substring(triggerBody()?('{Name}'), add(lastIndexOf(triggerBody()?('{Name}'),'-'),1), sub(sub(length(triggerBody()?('{Name}')),lastIndexOf(triggerBody()?('{Name}'),'-')),1))

Get ItemChild properties using Powershell Script SharePoint 2013 document library

We have a document library which contains multiple document set we have below requirements :

  1. Get all document set properties like Name, Created Date, Modified date.
  2. Get all ItemChild (document present inside the document set) properties Name, Created Date, Modified date.

We are able to get document set properties but unable to get ItemChild properties, any lead much appreciated, Please find my below code.

Add-PSSnapin "Microsoft.SharePoint.PowerShell"

$web = Get-SPWeb "Site URL"

$list = $web.Lists("ENERGY")

foreach ($listItem in $list.Items)
$CabinetName = $listItem('Name')
$CabinetCreateDate = $listItem('Created')
$CabinetModifiedDate = $listItem('Modified')
$CabinetChildItemCount = $listItem('ItemChildCount')

   Write-Host "    Cabinet Name: " $listItem.Name "  Modified: " $CabinetModifiedDate "Cabinet ChildItem Count" $CabinetChildItemCount "Created Date:" $CabinetCreateDate

$web.Dispose ()

ruby on rails – A document with the value ‘QuestaoMultiplaEscolha’ at the key ‘_type’ was used to instantiate a model object but Mongoid cannot find this Class

After updating the ruby ​​version from 2.2.2 to 2.6.5, some errors appeared when loading the model. I’ve tried replacing the mongo driver, installing other versions of the mongo, but the error persists. I manage to resolve it only by returning the ruby ​​version to the one it was before.

The versions of the gems of the mongo that I am using are these:

  • mongo (2.12.1)
  • mongo_session_store (3.2.1)
  • mongoid (7.1.1)
  • mongoid-compatibility (0.5.1)
  • mongoid-rspec (4.0.1)
  • mongoid_rails_migrations (1.2.1)

Below is the complete error line:

Mongoid::Errors::UnknownModel (
  Attempted to instantiate an object of the unknown Model 'QuestaoMultiplaEscolha'.
  A document with the value 'QuestaoMultiplaEscolha' at the key '_type' was used to instantiate a model object but Mongoid cannot find this Class.
  The _type field is a reserved one used by Mongoid to determine the class for instantiating an object. Please don't save data in this field or ensure that any values in this field correspond to valid Models.):
app/models/sequencia_questoes.rb:55:in `to_a'
app/models/sequencia_questoes.rb:55:in `block in novas'
app/models/sequencia_questoes.rb:41:in `each'
app/models/sequencia_questoes.rb:41:in `novas'
app/controllers/e/resolver_controller.rb:103:in `block (2 levels) in index'
app/controllers/e/resolver_controller.rb:10:in `index'

sharepoint online – Return to HOME after closing document

Stack Exchange Network

Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies - 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 New Proxy Lists Every Day Proxies123