List pages on the frontpage view in drupal - drupal

So, I'm relatively new to Drupal, and I'd like to make a Drupal site with a front page with a grid of links to other commonly used pages on the site. This site is intended as a sort of community page for a small town, so it would be links like Government, News, Business Directory, History, Forum, etc.
Some of these pages are basic pages on my Drupal site, some are external links, and some are links to views or modules, like the aggregator module. I'd like all of the links to be sortable and generally have the same markup. I'd also like these links to be gathered automatically, i.e. via the 'Promote to Front Page' option or something like that. I ABSOLUTELY DO NOT want to hardcode this to a basic page.
So far my solution has been to create a view with a list of title fields from pages promoted to the front page, and a special content type I named 'Link' which are actually just redirects to external urls. The problem now is that I don't know how to include special pages, like aggregator or view.
Any ideas? Is there a better way to do this? Have I missed something?

The easiest way to do this is as follows.
Create a content type called link with a link field on it.
Create a page view that displays all content of type link and displays the field link
This is a very basic way of doing it, if you wanted more than one list on the page then that would depend on the theme you are using and the links would need to be categorized in someway using taxonomy.
You may also want to look at the flag module.

Related

How to have single-slug behave like a normal page in WordPress?

I'm making a website in WordPress, and I'm using a plugin ACF PRO. I'm doing the entire site with flexible content, so the WordPress site is like a page builder.
Everything is fine, however, I came to a point where I need to have same functionality for single-[custom-post-type], so I can "Add row", header, footer etc... on it, but I can't figure out on how to do it.
I know that it's possible, because e.g if you look at this site here: https://rolleragency.co.uk/our-projects/
You can see that it works. I know they are using flexible content because I worked on that site and I did there what I wanted. I can't remember how to do that.
I think I had to use a Tempate Page? Or? I can't remember.
THe site is built entirely on flexible content, so everything there is modular and it's like a drag and drop, but how do I do that on single-slug?
You have to create a page template, yes.
So something like page-projects.php then in WordPress admin you would have a page called Projects.
The template you created should be automatically applied to this page. If it doesn't for some reason you can choose which template WP should use on the right side when editing a page.
Now, you can add whatever code you need to the page-projects.php. And also any fields you may need for that page you can set up in ACF by telling ACF to apply those fields to pages that use projects template.
This is how I would and did do it on several occasions :)

Put categories on PAGE url wordpress

Ok, here is the thing I have already added the categories to the pages (with the help of a plug-in, it's called Add category to pages) and so now I want to change the URL to display the categories (that is to say I want my pages to have this estructure: mysite.com/%categories%/%page_name% right now it has his structure: mysite.com/%page_name%), I have tried to google it but I can't find a straight answer. So if anyone has some resources (tutorials, articles) or some idea (if it's not to much to ask with code examples) on how to achieve this it would be fantastic. (And believe me, I'm asking as my last resource)
you can do it easily with "Page Parent" option available in WordPress.
Steps To create a subpage
Go to Administration > Pages > Add New screen.
In the right menu, click the “Page Parent/No Parent” drop-down/page attribute widget. The drop-down menu contains a list of all the Pages already created for your website.
Select the appropriate parent page from the drop-down menu to make the current Page a child Page.
Add content to the subpage.
Click Publish when ready.
Output - https://example.com/asia/india/
More Info. - Wordpress Subpage Permalink
well you can do this for categories and products from permalink setting, but if you want to manipulate the page url according to yourself then you need to create an blank page with the prescribed name whichever you want to insert, i.e, if you want to insert amazon within the url then create an url with name of amazon, and put the other url's under this parent page.
This way your url will look like
http://example.com/amazon/page_name
Unable to post as comment so directly posting it in an answer, in WordPress you can have custom URL. After you logged I'm as admin under dashboard you have general settings where you can put custom URL's like http://example.com/%caregory%/page_name
For more reference also checkhttp://codex.wordpress.org/Changing_The_Site_URL
I don't know if you tried this but after you login as admin, under Dashboard>>Settings>>Permalinks>>Custom Structure.
Let me know if you have already tried that.

Drupal add link to another page in header of a block

In Drupal 7 I created a views page, and I want users to have the option to view the results either as a list, or with thumbnails (like on a lot of websites). The only way I can think of doing that is creating one page with the results as a list, and having a link to another page with the results that have thumbnails.
But my question is, how do I add just a random link to the top of my block page that will direct users to the 'thumbnail' page?
I tried to use 'unfiltered text' in the header and put the html for a link in there, and when I went to the page it looked like a link, but I couldn't click it. Any suggestions?
For every view you can create set of templates to style it. When you edit you view open "Advanced options" and then at bottom click on "Theming options" (or suggestions...can't remember real text).
That way you'll get a very useful popup which displays all templates used by view...in specific theme. So if you want to change some template just click on it's original name, pick up it's original code (copy) and create a file. Save it at your theme templates directory, pick some of suggested names, add your link or what ever html you need and clear the cache.
Templating is a bit broad subject to discuss in details for you questions's answer - find some tutorial on net, but general idea is to use custom view template and store your html there.
BTW, I hope you have only one view and different displays for you different pages.

Changing just the url of gallery2

I inherited a implementation of Gallery2 embedded in a Drupal site. I need to change the url of the page this is on from /gallery to /somethingelse.
Drupal is not something I am very familiar with, but I've done some stuff here and there with it years ago.
The /gallery page is not listed anywhere in the admin interface and the content is living in page-gallery.tpl.php.
A 301 redirect is going to be necessary (which I do know how to do), but that isn't the solution I'm looking for obviously (just to avoid getting that answer). Is there any simple way to change this url?
First you will have to understand how drupal handle URLs & generate a page based on it. There are several way to have a URL in drupal, where you can navigate from somewhere.
Usually we make page(add content) of some content type, which you create before with all the required fields. Drupal give serial node number to all newly created page, so to have your own custom URL, you will need to use PATHAUTO module, which will create URL based on title of the page, though you can modify at time of creating page.
We create listings of some things e.g. images for gallery by help of VIEWS & we can create page for the listing. We get to give URL for the page, which you can edit any time.
We declare URLs in our custom module under hook_menu(). Other contributed module also do the same & that's why you get some pages when you enable the module.
Apart from page content, drupal have block system. A block can contains content, image, links etc & display of it can be set to all pages as well as any specific page. So there is no limitation for you to make your page with the URL which you want if you are using PATHAUTO module. If you have listing from views or code which is generating page, then you can always go there & change.

Can Wordpress Duplicate An Entire Page Structure?

I have a wordpress site that i've been working on that has some pages (as in NOT posts) that a client changes content on in order to target particular keywords. these pages have been using podscms for content management.
The client now wants to be able to duplicate these pages any number of times and edit the text within them. So basically, he wants to be have a dozen or so versions of about 4 linked pages.
Does anyone know if it's possible to duplicate an entire multipage structure like this in WP?
Or any WP driven sites that implement segmentation similarly?
I think your best bet would be to use Page Templates. You define them in the theme and then for each Wordpress page you create, you can select which page template you would like to use for the page. This sounds like what you're trying to accomplish.

Resources