Stack Exchange Network

Stack Exchange network consists of 175 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
1answer
23 views

URL routing with types

We need to setup following URL: DOMAIN/{lang}/{family}/offers/{slug} e.g.: example.com/en/Larsen/offers/example What do we need to configure our section URL? Have anyone an idea?
0
votes
1answer
30 views

Migrating custom routes from v2 to v3

I have a handful of custom routes configured on this project like 'action/(?P<custom_id>[a-zA-Z][0-9]{6})/(?P<slug>.*)' => 'action/_member', If I'm reading the docs correctly, then ...
0
votes
0answers
12 views

How to get url from related entry in another site

I'm relating entries from another site in my installation, and I'm having issues getting the correct URL for the entry. This is an example of what I currently have: {% set carouselEntries = entry....
1
vote
1answer
27 views

How to load entries data in the General Configuration file?

I'm trying to set dynamic paths for values such as activateAccountSuccessPath. This kind of code below from my routes.php file works very well: use craft\elements\Entry; $myAccount = Entry::find()-&...
1
vote
1answer
26 views

How I’ll get an entryId based on a given URL?

I want to configure deeplinks for an app and want to set up 'universal links'. Right now I'll send an entry id to the element api to get the right content. But with universal links I didn't have a ...
1
vote
1answer
22 views

Filter by slug from URL (advanced)

Channel: Restaurants Channel: Nutrition / contains entries field named restaurant. Required URL format: restaurant-name-nutrition since the URL structure is merged I can't use getSegement(x) ...
1
vote
1answer
23 views

Entries field in categories URI

Is there a way to pass value of an entries field into category URI format? {% if object.level == 1 %} {slug}-{entries.one().slug} {% else %} {slug}-{parent.uri} {% endif %} Thanks.
1
vote
1answer
23 views

Using language specific variables inside section URL settings

When i use some kind of variable in url settings of section, it always uses default language version of this variable. For example, blog has two languages, english (default) and german. If i use ...
1
vote
3answers
96 views

How do I get rid of “web” in URL?

I have been all over the docs page and various other topics across the web on this, and nothing seems to solve it for me. It's probably something obvious, but I am stuck. I recently installed Craft 3 ...
1
vote
1answer
124 views

How do I get different URL Format with parent/child structures & how do I display different templates?

I need to create a features structure section for a website that will have parent features and child features. Q1: How do I get different URL Format for parent & child pages? I need the parent ...
1
vote
1answer
33 views

Query for entry related to current entry in section URI settings

My entries within specific section can be related to each other using "Entries" field. If entry1 "Entries" field is filled with entry2, i want to entry2 url look like this: entry1/entry2 How can ...
1
vote
2answers
39 views

Resolve url from inside template

Can I resolve full URL to some object - entry or category, from inside Twig template? Mind you, I don't mean searching for something by slug, but by full URL. So, for example, instead of passing '...
1
vote
0answers
29 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 ...
1
vote
2answers
35 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
162 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
37 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
56 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 ...
2
votes
1answer
304 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
19 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 ...
2
votes
1answer
104 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
98 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
121 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
106 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-...
2
votes
2answers
74 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
43 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
262 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
98 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
113 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
51 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
58 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 ...
1
vote
1answer
83 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
590 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
96 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
759 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
92 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
133 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
42 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 ...
2
votes
2answers
1k 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
86 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
40 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
250 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
499 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
76 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
189 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
181 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
50 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
27 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
39 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
199 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 ...