The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [url]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

Include Field in URL

Looking for a way to include a field value in a section URL. Is this possible? It appears to work but always shows 'default' rather than the field value.
0
votes
0answers
13 views

How to get category/entry url and a category url in entry breadcrumbs

I have entries for a channel called ‘resources’ that are related to multiple resource categories. When I call the category specific resource entries in a index, how can I get the url of website/...
1
vote
2answers
68 views

How to remove something from the slug/url

I got entries in the folder /cms/web/videos/ and the url display this: http://domainname.com/cms/web/videos/barco-auro. I want it to be this: http://domainname.com/videos/barco-auro. How do I create ...
1
vote
0answers
11 views

Section URI format deprecation error

I'm using the following URI format of a channel {slug}-{restaurant.one().slug}-{locations.last().slug}-{locations.one().slug} It throws a deprecation error caused by locations.last() however when I ...
2
votes
2answers
48 views

Change entries URL?

In ExpressionEngine was a URL field under the title field that was filled when writing the title. It was possible to change the URL to something else. Also if i want to change the title of an entry ...
1
vote
1answer
30 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?
1
vote
1answer
40 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
60 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
36 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
32 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
32 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) ...
2
votes
1answer
35 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
29 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
185 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
273 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
55 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
43 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
32 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
39 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
253 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
49 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
157 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
719 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
21 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
109 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
167 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
187 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
142 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
95 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
53 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
360 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
129 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
117 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
64 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
71 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
113 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
758 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
124 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
1k 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
105 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
142 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
43 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 ...
3
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
97 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
45 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
313 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
581 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
89 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
223 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 ...