Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [url]

The tag has no usage guidance.

1
vote
0answers
13 views

Use sequential numbers for entry slug

I have a channel where I need each entry's URI include the year and then a sequential number, like this: 2018/1/ 2018/2/ 2018/3/ 2019/4/ I have no problem getting the year, but is there a way to get ...
0
votes
0answers
16 views

Force trailing slashes onto URLs without breaking the admin?

I've found several answers that simply redirect to trailing slash, however they all break the /admin for me. Can't move past the login screen. How can you do this in .htaccess while ignore any URLs ...
1
vote
2answers
30 views

URL Structure - advise and thoughts of best approach?

I am currently building a website for Hot Tubs and within this there will be New Tubs, Used Tubs and Hire Tubs (each will be a top level page on the navigation, and each tub will have a details page). ...
1
vote
2answers
44 views

How can I use the entry UID in the entry URI

The entries in my Craft app need a unique ‘non-guessable’ URL, so I figured I could use the UID in the URI of the entry. So in the section, where I need to provide the URI format I entered "section-...
1
vote
1answer
23 views

Locales and links not working as intended

I have taken over a project and Im having a small problem with locales. It is running Craft 2.6.3016 A section has a locale “en” where the english URL format is “en/contact”, and the entry also have ...
1
vote
1answer
32 views

Element-API: Access the first url of an asset array

I have an asset field in my current project with the handle postImage, containing multiple image files. In my element-api endpoint, I wish to access the url of the first file only. I tried the ...
0
votes
0answers
26 views

Craft 3.0 get current url's locale url [duplicate]

I have a craft 3.0 multi locale site set up and I'm wondering how I can take the current entry url and get the url of each equivalent locale of that entry? Basically, I have flag buttons on the top ...
0
votes
1answer
58 views

Asset (image) public URL does not work

I wanted to include some uploaded assets (images) in an entry. The .url property in twig outputs the proper URL, in my case: http://localhost/craftcms/web/image/photo-2017-04-02-16-20-53-1.jpg ...
1
vote
0answers
16 views

Craft 3: Prevent craft adding script filename to URLS

I'm running Craft 3 with multi-site. Working well so far, but my hosting doesn't allow me to create traditional vhosts with their own directories and shared upper filesystem. As such I have an ...
0
votes
0answers
32 views

I can access an asset filename, but not its URL

At first I was trying to use the one(), but it always told me the Object of class Craft\ElementCriteriaModel could not be converted to string So searching the documents, I found first(), and that ...
2
votes
1answer
90 views

How to create clean URLs for category strings?

This code for linking to a category page: href="/products/?category={{ category.slug }}" Generates this URL: www.website.com/products/?category=category-name Can someone please tell me how to code ...
1
vote
1answer
34 views

How can I set a landing page for a structure with no slug?

In Craft2, I have structures that each have a landing page/homepage for that structure. If the structure's URI format is "liver/{slug}", how do I make the 'landing page' entry have a URI of only "...
1
vote
1answer
70 views

Point a plugin into to a local file

This should have been easy. But, I am dorking something up. I am trying to point FeedMe to a local file. In Finder, the file is located under /Users/shellyar/Desktop. I also tried `file:////Users/...
1
vote
2answers
73 views

Structure entry position in url

Is it possible to include the entry position (Structure) via the Entry Type Title Format? This is the current format: published in {postDate|date('F')} {postDate|date('Y')} which renders: published-...
0
votes
0answers
99 views

Local URLs in url field type

How can I put a local URL inside a url field type like @web/route-to-path?
2
votes
2answers
65 views

Change posts url without losing SEO positioning

I migrated a site with over 500 posts from Wordpress to Craft 2.6 recently but came across this problem: the WP site used to set post's urls as https://mysite.com/{slug} while the new blog is (...
0
votes
1answer
36 views

How can I use two different templates for a single entry?

I'm building a coursework site and have a Course section, who's entries will be courses containing work that the client will assign to users. I built in both the work itself (different "lessons" ...
1
vote
1answer
31 views

Adding multiple slashes after the site URL breaks the current entry, but still loads the template

I've come across an issue where typing the URL e.g www.sitename.com///about will still load the about template, but not fill the page with the content. Is this an issue for google finding the ...
1
vote
1answer
132 views

Get the section name based on a url segment

I'd like to retrieve the name of a section based on a url segment. Normally I would use {{entry.section.name}}, but this doesn't work, since there is no entry available. I've got this working: {% ...
1
vote
1answer
78 views

Include the URL of a related entry field

I would like to add the URL of the channel entry I have selected (atm 2 channels are available to choose from), so I would like a url like: summerhouses/product1 or greehnouses/product2 how would ...
1
vote
2answers
101 views

404 error if folder in public_html has same name as folder in craft/templates

I am currently transfering a live website to Craft CMS. I am trying to keep all URLs of pages and images exactly the same as the live version, because of all the pages and images cached in Google. ...
1
vote
1answer
41 views

How can I manually update the URI of an entry?

Is there a way to manually change the URI for an entry? for instance where is this stored in the database (is it?) I need to update one that is: /vacancies to /vacancies-1444 for example the 1444 ...
1
vote
1answer
40 views

Force Anchor ID into page URL

I'm trying to add tabs into my Craft Site and have just noticed that when you add an anchor point, the anchor ID doesn't actually show up in the URL as it would a normal site, however I need this ...
0
votes
0answers
43 views

How to make URLs translatable in Craft 3

I am trying to make the URLs translatable according to the language selected for the site.
1
vote
1answer
337 views

Craft 3 with Multi-Site: how to not set a primary site, or add a first segment to all primary site URLs?

I have a main domain, www.mycompany.com, which has several groups of sites, which are available in several languages: www.mycompany.com/international www.mycompany.com/sales/en www.mycompany.com/...
1
vote
1answer
76 views

Setting channel url format to include value of entries fieldtype URL

I have a channel with an entry type which has a simple dropdown for {region} and an entries fieldtype which links to a channel of destinations. I'd like the URL format for the channel to be /region/...
1
vote
1answer
445 views

Entry URL Format

I'm currently trying to get my URL's to be like the following: category/brand/offer/ Category has a title Brand has a 'shortName' property. Offer has a title My plan is to have it so that it goes ...
1
vote
2answers
75 views

Advanced routing

I am trying to do this. Have a structure url like so: /{id}-{slug} and /{parent.id}/{id}-{slug} I need the slug on the url but I only for SEO, I want craft to ignore the slug and only go for the ID. ...
1
vote
2answers
115 views

Equivalent of “EE Pages” module in Craft?

I'm struggling to find a solution for a clients request to be given complete flexibility to create new sections and pages from within Craft. Essentially I would create a series of generic page ...
1
vote
2answers
39 views

Having trouble with Bilingual URLs

I'm in the midst of setting up a bilingual website. English and Welsh. I have set up the locales in my settings (en and cy_gb) My directories have the necessary folders for each language, with each ...
0
votes
0answers
43 views

Having trouble with mod_rewrite on a subdomain using multiple environments

I'm trying to set up a development environment for my Craft site. My production site works like a charm, but my development site is using index.php?p= Both environments are using the same general.php ...
1
vote
2answers
752 views

Using pagination on a page with url with query string data

I have an index page that filters entries based on url query strings, eg: site.com/inductees?county=123. I put together a very simple pagination setup with next/prev links. However, when I click "...
2
votes
1answer
69 views

Conditional anchor in structure url

I have a structure section, where the last child should be an anchor in the slug: parent/parent#child I'm trying to setup conditional url formats on nested entries as such: {parent.uri}{% if object....
0
votes
1answer
34 views

I need to update an existing URL

I have inherited a Craft website and need to update an existing URL, it will open a PDF document, so I need to replace an updated PDF I have very basic Craft knowledge so need assistance. I have ...
1
vote
1answer
122 views

Installing Craft in a Sub Folder

I have created a Craft CMS site on a VPS Server running CentOS 7. I have a file setup on the public_html like this: - cms craft public app (this is running a Symfony Framework Web App and runs from ...
0
votes
1answer
355 views

Dynamic Entry URI's for pages

This is probably very straight forward but unfortunately I can't seem to solve it. We want to create a dynamic URI structure that allows us to easily create pages and link them with parent ...
0
votes
1answer
54 views

Disable “dynamic links” in rich text fields

When we're adding a "link > link to an entry" to a rich text field, this will result in a link to https://www.site.com/page#entry:3962:url and we understand what the purpose is of this additional #...
1
vote
2answers
132 views

Trying to launch Craft CMS site on 1&1.co.uk and told I don't have permission. Any help why?

Does anyone know how to launch a Craft CMS site on 1&1.co.uk web hosting. I've uploaded my database, changed the siteUrl and uploaded the site with FTP but it's not working. I receive an error ...
1
vote
1answer
143 views

Get the category into the url of the product page

I'm in the middle of learning Craft Commerce. When I go to an individual product my URL says /shop/wella-shampoo/. I'd like it to say /shop/**hair-care**/wella-shampoo/ because this is the category ...
1
vote
1answer
43 views

Assets have old URL

I've just changed my local development environment from using .local domains to .localhost (no more DNS trouble on MacOS, yay!). So I set Crafts siteUrl to .localhost, and while Craft serves pages ...
1
vote
1answer
25 views

Customise the URL for an asset

I need to prepend a URL to the beginning of an asset URL in order to track stats for a podcast via Blubrry. What are the options? Specifically I need to drop the https that would appear in my URL by ...
1
vote
1answer
31 views

How to read form response URL variables in template?

I have a basic login form that's talking to a separate server that's out of my immediate control. I'm trying to read the responses it's sending in the URL within the Craft template. For example... ...
1
vote
2answers
108 views

provide a 'back' or 'cancel' or 'close' button to return to whatever page that particular template was accessed from

I have two templates. For the purpose of this question lets say the first template is step 1, and the second is step 2. There are links to launch these templates all over the site, but some times an ...
1
vote
1answer
87 views

Why does index.php persists in my URL?

I've gone through all the steps here to remove index.php https://craftcms.com/support/remove-index.php The .htacess file is the default one that came with Craft on install <IfModule mod_rewrite....
0
votes
2answers
98 views

entry.url forcing https

{{ entry.url }} is generating a https:// link. I don't have SSL on this site, so the page errors out. Settings > General > Site Url is "http://..." My .htaccess is below (though I've read the ...
0
votes
0answers
62 views

URLs on subpages wrong

I am running Craft 3 beta. Now I am witnessing an issue I never had with Craft 2. On every subpage (mywebsite.dev/subpage) I have wrong URLs whenever I try to use relative URLs. For example an image (...
0
votes
1answer
35 views

Replacing content a specific URL/page already reserved in Structured Data Entries

I have a site that I've created a 'Generic Page' type for that is a Structured type with URL Format of {slug}. This is great for the client as they can create an entry for 'toplevelpage' and then ...
2
votes
1answer
654 views

If page conditions

I have an {% include%} which displays entries from a structure. This {% include%} is displayed on the homepage and other entries throughout the site. On the homepage, I'd like the include to show a ...
0
votes
2answers
32 views

Strange 'index.php' Issue

I have built and deployed dozens of Craft sites, so I know how to remove 'index.php' from urls, but now I have a site that refuses to accept my most determined efforts to remove it. This is the ...
1
vote
1answer
232 views

Invalid verification code. Please login or reset your password

I am sending the set Password URL to a user to set their password after ADMIN create a user in CP. I am using craft()->users->getPasswordResetUrl($user) to generate the URL for set password ...