7

By default the Seg2Cat extension will only populate the {segment_n_category_id} vars if the corresponding segment is present. So in your case when segment 3 is blank the {segment_3_category_id} var does not exist so it's passed to the channel entries tag as a raw string. To fix this you can tweak the extension settings and set "Set all segments" as Yes. ...


7

Install the Streeng plugin. Perform common operations on strings. Change case, truncate, find/replace, repeat, encode/decode, generate slugs and more. One of the parameter options is capitalize="yes" which lets you capitalize the first character of the string.


7

I believe EE actually throws this value away, and it should. The hash is a front end display feature for your browser, not a url. Use it for javascript and scroll-to positions on a page. You should re-think why you need to be using the hash in the first place.


6

CE String is another great option. CE String is a string manipulation tool for use in your ExpressionEngine templates. It is feature-packed, and allows you to manipulate strings (text) with very simple syntax. You would just do: {exp:ce_str:ing strtoupper}{segment_2}{/exp:ce_str:ing} CE String has tons of other useful methods. And the chaining feature ...


5

This will depend entirely on how you have your server set up. ExpressionEngine is only aware of things that go through the index.php file (or if you have by chance renamed this file, then whatever you renamed it). On Linux servers, often .htaccess will be used to remove index.php from the URL but still send all requests through index.php. So for instance, ...


5

Low Seg2Cat works great for this. Low Seg2Cat loops through the segments of the current URI, matches them against existing categories, and registers the matching categories as global variables, which you can use in your templates. You'd be able to access your category name using {segment_3_category_name}


5

Use Switchee. It supports regular expressions, and example on devot:ee page shows how to use that to check for pagination.


5

I use Switchee to detect pagination except in cases where I just can’t work Switchee into the template, in which case I use MD Detect Page Type. Switchee example: {exp:switchee variable = "{segment_4}" parse="inward"} {case value="''"} Not Paginated {/case} {case value="#^P(\d+)$#"} This is Paginated {/case} {/exp:switchee} ...


5

This is a CSS issue I think. Try a CSS selector like ul > li.active to make sure it's targeting just the first tier li.


4

I'd check out Cat2: http://devot-ee.com/add-ons/cat2 And you can use it like so... category_name from category_url_title {exp:cat2:name category_url_title="{segment_3}" category_group="5"}


4

If you're displaying your categories using standard category URLs (e.g., /products/category/central-vacuum or /products/C12), then you only have to add the status parameter to your Channel Entries tag (the category will be filtered dynamically based on the URL). {exp:channel:entries channel="products" status="Featured"} ... {/exp:channel:entries} So in the ...


4

Few days ago there was a question about Strict URLs in EE, enabling Strict url you have option to link directly to template jumping over template_group What does "Enable Strict URLs" really mean? does this solves your issue?


4

I'd create a template group called supernav, and put this in its index template: {redirect="{segment_2}/{segment_3}"} (If there's no 3rd segment present, EE will ignore it.)


4

Yup, this is a snap with Low Seg2Cat. Example: {if segment_2} {exp:channel:entries channel="channel" category="{segment_category_ids}"} .... {/exp:channel:entries} {/if} (If you're going to be using other filters, or pagination, in your products/index template, then you need to do more advanced checking in that conditional to determine whether ...


4

Try doing this in your .htaccess file. This StackOverflow answer shows how. Something like this: RewriteEngine on RewriteBase / RewriteRule ^/(students|parents|faculty|alumni|galleries)/(.+)$ /$1 [L,QSA] The Router addon may also work for you. Router is a regular expression based routing system for ExpressionEngine requests. It allows you to define any ...


4

The simplest way is to use Rob's Mo Variables which comes with some very useful global variables for use in your templates including "{if paginated}". This also makes it very easy to see what the code is doing when you re-visit it at a later date. Failing that I'd fall back to Switchee. -----


4

While you could easily use Stash to pass the entry ids as a variable, you shouldn't. To create the variable would mean iterating over the entire list of entries in a channel. That's expensive just for a simple routing operation. Assuming this is being run on your site's default index template, and you have strict 404s disabled, why not just redirect if ...


4

Well here is the issue. You are trying to give OR condition for 2 strings. OR condition will return true if any one of the given statements are true. If you want to execute the code when url_title not equal to "portfolio" neither equal to "photos" use this condition: {if segment_2 != "portfolio" && segment_2 != "photos"} <p>Conditional ...


3

In your case, you were comparing 2 variables (string) without quotes so both variables will be considered as TRUE i.e {if TRUE == TRUE} #### {/if}. In the same way when you put a single variable tag in if condition like {if variable_name} #### {/if} OR {if {variable_name}} #### {/if} Having the quotes (single or double), EE considers the variable/s tag ...


3

I always tend to identify the product details page as simply /details/ to avoid this problem, but to achieve what you're after, the following should work (in theory). Note that your example doesn't take into consideration pagination which would change the last segment. Maybe the client doesn't want it, but may once they get bulk products in there. The ...


3

Is this URL failing? EE shouldn't do anything. Since the directory exists on the server it should load just fine. There will only be an issue if you have a template group with the same name. In that case, EE will load the template group if I remember correctly.


3

ExpressionEngine have a variable {last_segment} to get the last segment of URL. You can use any Math plugin like "Simple Math" (http://devot-ee.com/add-ons/simple-math) and divide that last segment by 100. {exp:simple_math calculate="{last_segment} / 100"} Also, try by using PHPStringFun (http://engaging.net/products/phpstringfun) to format the number.


3

Try adding this within your channel:entries tag: {exp:channel:entries ....} {if no_results}{redirect="404"}{/if} {/exp:channel:entries} This should trigger a 404 error on paginated pages that have no entries in them. If you install Mo' Variables, you can enable an {if paginated} conditional for your templates. Then you can get a bit more specific and ...


3

ExpressionEngine 2.8's introduced Template Routes so you now have more control over how your templates are processed. It allows you to override the default template route, which is /template_group/template. For example instead of going /blog/read/url_title you can now add a template route for read.html in the blog template group to load like /blog/url_title ...


3

Check the date on the entry. Perhaps it has accidentally been set to the future at some point and so only just started working now. Just a thought.


3

Theoretically it is possible. IF you are on EE 2.9+ you can use Mathematical Operators in your conditionals. (Thanks Derek for reminding me about that!) If you are using a version below EE2.9 you would need to use something like MX Calc to calculate the totals and then use that to call an embed to get around parse order issues. Having said that is probably ...


3

You should try your code in below manner. {if ! 'portfolio|photos' *= segment_2} <h1>Conditional content.</h1> {/if} You can also try in another way also. {if segment_2 == 'portfolio' OR segment_2 == 'photos'} {if:else} <h1>Conditional content.</h1> {/if}


3

I would use this to check multiple pages: {if "page1|page2" *= segment_2} active {/if}


2

Switchee will work in some cases, but I've also been using the very versatile Mo'variables successfully. Among other things, it has a handy {if_paginated} conditional that checks whether pagination appears in your segments. Pleanty of other goodies as well in terms of working with segments. EDIT: code example (not at my desk so cannot test) {if segment_4 !=...


2

You may also consider using Switchee


Only top voted, non community-wiki answers of a minimum length are eligible