Hot answers tagged

7

If the project has relatively low needs in terms of site-wide data (read, If you don't need custom fields), then I tend to store these in global variables and snippets. When I need to store more advanced content, I personally use low variables. Pretty much a default now on medium or big EE builds. You can then use custom fields like Matrix, Wygwam, playa, ...


6

Low Alphabet will let you generate alphabetically ordered channel entries with the option to define ignore words like 'the' and 'a'.


6

Remove safecracker_file from your third_party directory. It has been deprecated (now rolled into the standard File fieldtype).


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 ...


6

Your option is a good one and not hard at all. Instead of expiring the entries, I would future date them and set limit="1" on your channel:entries tag. This way an entry will always appear. With expiring you risk human error causing an image not appearing.


5

The channel entries tag is a bit special in that, by default, it looks at your URL to determine how and whether to filter the entries that it returns. You can switch off this dynamic behaviour with the dynamic="no" parameter. Primarily, the tag will filter itself down to entries matching a url_title contained in segment_2 or segment_3 (bear in mind that ...


5

I recommend using SEO Lite. It will save you from having to open up a channel:entries tag just to grab the title. Plus it can be used for a meta description tag (which is also useful for og:description and social share text). And it has a variety of useful parameters to help you pull the right title and to add prefixes or suffixes to your title. Just ...


5

Now that ExpressionEngine includes a modulus operator (as of 2.7.1), you can also use that instead of switch if you prefer. Put the first html block's opening tag and the final block's closing tag outside of channel:entries and use modulus to conditionally close and re-open blocks of html: <div class="item-container active"> {exp:...


5

There is no direct way. I suggest you to install this module Edit If incase you have values to pass with comma separated (i.e., 5,00,000.05), You need to edit pi.math.php file to add this code on line number 54. // remove commas $formula = str_replace("," , "" , $formula);


4

I expect the developer who configured the site restricted your admin privileges so that you can create entries and post content to the site, but not configure the website. Channels, template groups and templates are all underlying components that structure what the site supports and how it renders. They all need to be accompanied by code to work on the ...


4

Chances are you're missing a required field in that channel, or submitting some incorrect data. To find out why your entry is not being submitted, add this within your "if submit_new_entry is false" conditional: print($this->EE->api_channel_entries->errors); exit();


4

Yep, add dynamic="no" parameter to the channel:entries tag :)


4

You might use "Low Alphabet" See the tags from here: http://gotolow.com/addons/low-alphabet/docs/tags For last_name, just pass parameter orderby="last_name" within {exp:low_alphabet:entries}


4

Within the channel entry API, you can pass the data array containing the array of category ids like: ee()->load->library('api'); ee()->api->instantiate('channel_entries'); ee()->api->instantiate('channel_fields'); $data = array( 'title' => 'ENTRY TITLE', 'entry_date' => time(), 'channel_id' => x, '...


4

ExpressionEngine natively processes forms in secure mode which means each for submission is tied to an automatically generated XID / Hash which is passed as a hidden field in all CP and most front-end forms. The XID is a hash containing a reference to a database entry which gives EE a bunch of info about the user (their user agent, timestamp created, ip ...


4

It appears that the behavior you're experiencing is an accepted bug, at least for the status. See the bug tracker. There doesn't appear to be a fix posted, but you could potentially create the status and category fields as hidden inputs, if security isn't a big concern.


4

If you turn on the Output Profiler, you will be able to see the list of SQL queries generated for any page.


4

Another simple idea... Name your images like this: December-1.jpg December-2.jpg December-3.jpg Manually upload the images to the server... in your template call image like this: <img src="/path/to/images/{current_time format="%F-%j"}.jpg"> The image for the current day will always be called. EE date formatting options are here: http://ellislab....


4

You need to ensure that you have created a Channel Field Group and assigned that to your Channel (News). Then, make sure that you have created at least one field in your Channel Field Group. In this case it would be a Textarea Field Type with a name of body. Then in your Publish/Edit screen for your Channel you'll see your new Body field. Once you enter in ...


4

You need to use the require_entry parameter: {exp:channel:entries limit="1" require_entry="yes" [...]} {if no_results} {redirect="404"} {/if} [...] {/exp:channel:entries} This parameter make the {if no_results} conditional available.


4

Form layouts is where you can setup the input form and fields for entering data via the Create or Edit entry pages. You can save a layout for specific users per channel so that a given user will see the entry form that you have saved to a layout. In this way, you can reorder or hide fields as needed. For example, say you have a user that you don't want to ...


4

Yes, this is possible. You can do this by making simple template and embed. Create one template template_name.html in your template group and insert below code. {exp:channel:categories channel="channel_name" disable="category_fields"} ******************************************************* <br> Category Name : {category_name} <br&...


3

Yes you can. I just tested with this code: {exp:channel:entries search:pt_assets="not IS_EMPTY"} <h1>{title}</h1> {/exp:channel:entries} <hr /> {exp:channel:entries} <h1>{title}</h1> {/exp:channel:entries} and definitely got only entries back that had Assets in the first set of entries; and all entries in the second. I hope ...


3

After tinkering around, I found out that the way to do it is to set these values inside the method $this->EE->api_channel_entries->data['my_field_id'] = 'my_field_value';


3

Reverse related entries does support six of the typical parameters "channel", "status", "sort", "orderby", "offset", "limit". So parameter "show_future_entries" wouldn't be supported. ***** EDITED ******* You can fulfill you need with SQL in Query module with the following code example: {exp:channel:entries channel="channel_name1" limit="xx"} {exp:...


3

The Channel URL setting is intended to mark the URL of the channel itself, not of just one of its entries. You should use the Pages Module for this.


3

Create a category group in EE called "Cars" (assumes cat group ID of 2 in code below). In there you create categories with the Make. You then create child categories of each Make with the relevant Model. You can then create children of the models if there are variants of the model. Channel Categories Main landing page template has this code: {!-- MAKE --} ...


3

If you use the {url_title} for the href that should do the trick: {exp:channel:entries channel="blog" limit="10"} <li><a href="{url_title}">{title}</a></li> {/exp:channel:entries} Also you might need to add the dynamic="no" parameter to stop EE limiting the list based on the URL e.g. if you are on a single entry page. If that's the ...


3

If you have Wygwam installed, I'd recommend taking a look at GWCode SyntaxHighlighter. http://gwcode.com/add-ons/gwcode-syntaxhighlighter It's served me well for years now, and since it's integrated as a Wygwam toolbar button, it allows you to mix prose and code all in one single field. Cheers, John


3

If you don't want to use channels, use low variables with a grid field with days of the week as the grid rows. Give each a file upload field and an alt field then use some logic on the template to get the day and call the low var for that day. Simple example, not verbatim code purely reference Grid field: date_1 | imgxx | alt title date_2 | ...


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