Change node title on search results in drupal 7 - drupal-7

In drupal 7 I want to change the node title for my search results.
The reason for this is because when the search results are viewed. The current page title in breadcrumbs is set to "content". I wish to change this to my own specific title.
Please can someone help me with this it would be appreciated.
Thanks
Jonathan

In Drupal 7, you can use this in your theme's template.php:
function hook_preprocess_search_result(&$variables)
It works for me.

Related

How to add Pagination to a Hugo theme

I am using Hugo (https://gohugo.io/) with the PaperMod theme (https://github.com/adityatelange/hugo-PaperMod).
Now I created a page where I want to post pictures. But the page will be very big after some month. So thats why I want to add pagination. There should be only 5 or 10 pictures per page. At the bottom the user can click through the other pages.
How can I do this? I'm a noob in editing templates so I do not understand how to follow the docs: https://gohugo.io/templates/pagination/
Maybe someone can help and tell me what I need to edit?
Page: https://i.ibb.co/1QzyRm9/ed6ebc2c5f3b83eed63ac93cfd7b8763.png
Thank you very much...
That theme seems to already use the Pagination feature that Hugo has, so there is no need for you to change the template.
If you check the Hugo documentation on configuring pagination, you'll see that there is a setting for the item count.
# config.toml
paginate = 10
You need to update your own config.toml file with this key, and set it to whatever you need, e.g. 5.
You can try changing the value, and creating some posts there, to double-check that it's working properly.

How to manipulate 2sxc/dnn search result titles?

Does anybody have any idea on how to manipulate 2sxc/dnn search result titles?
Something like si.Title ?
Becuase at the moment search results are showing the page title and not the post title.
si.QueryString = "details=" + article.UrlKey;
si.Title = article.Title;
I tried the above code but it does not work.
2sxc doc: https://docs.2sxc.org/api/dot-net/ToSic.Sxc.Search.ISearchItem.html
Hi #BondLookingForAnswers - welcome to StackOverflow :)
I'm not sure if DNN will prefer your title to the page title, but either way I suggest you check out the latest blog app (https://2sxc.org/en/apps/app/blog-app-v4), which customizes the search results, and see where that gets you.
Good luck!

global text into a link drupal 7

I have a view and has created fields like a title and gglobal text that contains an image.
The field title has enabled the option " Link This field to the original the piece of content" that makes it a link to the node , but want to convert the picture also a link to when you click on the image leads to the url the node .
how could I do this?
thanks
you may use the rewrite option to make image field as link in drupal views with replacement pattern.

Drupal 7 Content type restrictions

How to add a restriction or validation for a content type that can be add only one content.
ex - Hotel web site room listing page should have only one content. After added once that only can edit or delete.
(I am a beginner for the Drupal)
Have you checked Node Limit module? I have never used it, but seems suitable for what you want to get.
Hope it helps.

Drupal 7 - Where is the Menu Description stored?

For the life of me I can't seem to track down where the "Menu Description" value's stored in Drupal 7!
For example:
I added a new menu link called "Cookie" and the menu description called "Yummy". I go into the Drupal database and I can't seem to locate the string "Yummy" in
menu_custom or menu_links or menu_router infact i dumped the database and searched for the string "Yummy" and still can't locate this.
Any help will be great
It should be in your menu_links table under the options field. Note that it is not the only data in that field.

Resources