18

There are several strategies for best utilizing 404s on a Structure site: Hide Structure Templates to Prevent Duplicate URLs First, make sure that any Structure-assigned templates are either hidden, or inside a hidden template group (prepend the group or template name with "_" or "." - so "_blog" or ".blog"). This ensures that there is no duplicate EE URL ...


12

Sounds like the field's settings have gotten mixed up at some point. I'd try switching the field to "XHTML" formatting, and select the option to "Update all existing channel entries with your new formatting choice?". Once that's done, then switch back to "None" formatting and update all existing again. Hopefully that will resolve for you.


10

I have recently used EE templates to make JSON output from channels that contain a range of custom fields, including P&T’s Playa, Matrix and Wygwam fieldtypes. Those that are not familiar with JSON might find this useful. While it is a bit fiddly, all that is really required is a resource who is familiar with the JSON syntax/format to help you craft the ...


10

To rewrap your question in a "pros/cons" list: Pros Editing through your favorite editor -> faster Enables you to version your files with a VCS You can DIFF files Easier to maintain code markup/layout Cons Slightly slower because EE needs to check the files for a new version (i guess it only uses the file versions in the latest EE releases). Could be a ...


7

I know we talked about this on Twitter yesterday, but looking at the EE docs again it says: "Up to four different instances of the view counter can be used (each on a different page), enabling you to track different aspects of an entry independently" Which isn't immediately clear (at least in a pre-coffee state). So I did a quick test on my local ...


7

As someone who has been using EE for years, and going about templating in exactly the manner you are trying to for those many years, and who is just now learning a much easier way, I would like to suggest you look into using Stash. The difference is that in the EE templating method you are pursuing, and that I and many others used for years is that your ...


7

Sorry for the super simple answer, but I would just abstract your logic so you could execute the same function with the cron job as you would with the template tag. By creating an EE module you could create an ACT id to execute the cron job script, and use the plugin portion for the template. A common library would be the two that links it all together. ...


7

That would be the save templates as files feature. Once you've configured a template path you can save individual templates as files or you can sync all of your templates to file via the Templates > Synchronize Templates page. Once you've done that any changes you make to the template files will take effect immediately, without you needing to manually sync ...


7

You can't have a template group without an index template, but you don't have to use it. You could either set the preferences for the template in the CP to have it inaccessible to guests or simply place {if segment_2==""}{redirect="whatever"}{/if} in it to prevent access to the template directly.


7

Looks like you were missing the relationship tag pair for your person field. Try this: <Videos> {exp:channel:entries channel="videos"} {person} <Video> <Subject>{person:title}</Subject> <Facts> {person:facts} <Fact>{person:facts:fact}</Fact> {/person:facts} ...


6

Wouldn't this work? {reverse_related_entries channel="review"} {if count == "1"} <aside id="reviews"> <h3>Reviews</h3> {/if} <article> <h4>{title}</h4> {review_body} </article> {if count == total_results}</aside>{/if} {/reverse_related_entries}


6

Here are 3 quick/easy options: USING PHP This question on Stack Overflow sounds like what you're wanting to do: Use php to trigger another php script, then ignore USING CURL Another method would be to use CURL. Here's a Stack Overflow answer with an example. USING JAVASCRIPT Another method is using JS/jQuery. This answer on Stack Overflow shows example ...


6

It looks like you found a bug, Sean, sorry you got bitten by it. I've reported it and posted a fix here: https://support.ellislab.com/bugs/detail/19871


6

Conditionals based on URL Segments is how I would handle this. For your example, I would have in my books/chapters a conditional like {if segment_2 == "summary"} {embed="embeds/summary_code"} {/if} I'd use an embed just to keep the template cleaner — instances where I do this do tend to be on more complex site where I like keeping things as clean as ...


5

Good morning! Let's step back for a moment. First, if you are new to EE and especially categories then I'd recommend reading through this tutorial I wrote a while back. Basically I think you are trying too hard, and shouldn't need to nest entries tags into category tags like that - it not only shouldn't be necessary but can be a performance drain as well. ...


5

The permalink variable will take into account template group and template if you specify them. So for example... {permalink="products/detail"} would give you... http://example.com/products/detail/1 ...where "1" is the entry id and "detail" is a template in the "products" template group. But, as far as path variables go, my preference when building ...


5

Your code is correct, and should work. EE will always look at the third segment for either an entry_id or url_title, unless you specifically add dynamic="no" to your Channel Entries tag. So although the suggestions that you specify entry_id="{segment_3}" or url_title="{segment_3}" will work, they should not be necessary. Note that in your first code sample, ...


5

The query you'd use to change all templates to be saved as files is: UPDATE `yourDBname`.`exp_templates` SET `save_template_file` = 'y'; And if you wanted to limit it to only a certain group you'd use the following: UPDATE `yourDBname`.`exp_templates` SET `save_template_file` = 'y' WHERE `exp_templates`.`group_id` =X; Change out yourDBname for your ...


5

Are you looking for something as straightforward as this? <html id="template-{segment_1}-{if segment_2 != ''}{segment_2}{if:else}index{/if}"> Ah, I see you are wanting embeds as well. Here is a very simple plugin that will output some metadata for the template that is currently being processed. <?php if ( ! defined('BASEPATH')) exit('No direct ...


5

There seem to be two different questions here: Where do you store "assets" like CSS or JS files in an EE install? Personally, I store them out of EE and access them using either a path relative to root or using the {site_url} variable. <link rel="stylesheet" type="text/css" media="screen" href="{site_url}/assets/css/screen.css" /> <link rel="...


5

I would suggest checking your config.php file and see if any of those global template preferences are explicitly set in your configs. If you are using FocusLab master config, I would check config.master.php and your individual environment configs.


5

I think it's fair to say that themes should be looked at as examples and nothing more. I also think most people start off EE sites without installing a theme and also most people I know delete Agile Records from their installs from the get go. ExpressionEngine really makes no assumption about what you want to build for the most part. With that said, there ...


5

It sounds to me like you need the Pages Module. Essentially you'll create a single template, more if you need to, and then each entry you create using a channel assigned to the pages module, in your case "static", can have a unique url. So you'll easily be able to assign domain.com/foo or domain.com/bar I use pages regularly for this. IMO it's really great ...


5

This is as a result of the Strict URLs feature being enabled by default in EE2.6+ (previously it was opt-in, now it's opt-out). If you want the old behaviour back you can change it in Global Template Preferences


5

The reason you do not have access to that variable outside the loop is because your stash tags (getters and setters) are not parsed at the same time. EE module tags are parsed recursively from the outwards inwards, peeling them one after another like a oignon. In your code above, your stash set tags are inside an entry loop (level 2), while your get tag is ...


5

Documentation is a good place to start: http://ellislab.com/expressionengine/user-guide/templates/globals/single_variables.html http://ellislab.com/expressionengine/user-guide/modules/member/index.html#custom-profile-data-tag {member_group} or {group_id} {member_id} also (if in channel:entries tag pair and don't want conflict): {logged_in_member_id} {...


5

To extend Robson's answer, I've just been implementing this myself in the past few hours!: MX Mobile Detect and on Devotee I could simply detect which device it is (e.g. ipad, iPhone, blackberry, etc), but that's too specific for my needs. I just want to detect the different sizes of device so I can drop smaller images... So, in addition to my JS ...


5

From what I saw in a comment from Mark Croxton here: http://devot-ee.com/add-ons/support/stash/viewthread/8717 EE tries to cache tags that are used multiple times within the same template. To get around this, there's a "random" keyword that EE looks for that will cause it to use a separate marker for this tag (causing the tag to parse twice) The problem ...


5

I'm guessing it's just the way your templates are set up. Is your template group called feed.group? And the template itself called feed.xml? If that's the case it will need to be accessed at http://example.com/feed/feed. Or you can change your RSS template to be feed.group/index.xml so you can access it at http://example.com/feed as desired. If this misses ...


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