Hot answers tagged

11

You can include the author's name and a link using the author and author_id variables. For example: {exp:channel:entries channel="blog"} <h2>{title}</h2> {body} <p>Posted by <a href="/blog/author/{author_id}">{author}</a></p> {/exp:channel:entries} Then, at its most basic, create a template to display posts ...


11

Sure - first you need to track views in order to determine popularity. So on your "single entry" templates, add track_views="one" to your channel:entries tag. Then, you can use orderby="view_count_one" on your channel:entries listings tags.


9

Use the built-in Stats module: {exp:stats channel="products"}{total_entries}{/exp:stats} Or the Query module: {exp:query sql="SELECT total_entries FROM exp_channels WHERE channel_name = 'products'"} {total_entries} {/exp:query} http://ellislab.com/expressionengine/user-guide/modules/statistics/index.html#total-entries


7

From performance view is better to use query for this: {exp:query sql="SELECT count(*) as total_results FROM exmx_channel_titles WHERE channel_id = '2' "} total results: {total_results} {/exp:query}


6

The "limit entries by status" setting for the Relationship field controls what entries are available to select in the control panel - not what entries will display in your templates. So if you have the field set to "any status", and you've selected child entries with both "open" and "featured" statuses, then your tag will need an explicit status parameter: ...


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

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

http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#date-heading completely missed this before, but should make this more than possible. EDIT In response to the above comment, a better formatted view: <ul> {exp:channel:entries channel="blog"} {date_heading display="monthly"} <li>{entry_date format="%F"} &...


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

You might could do something like this (php must be enabled on input) <?php $entries = array(); $sql = "SELECT author_id as author, max(entry_id) as entry_id FROM exp_channel_titles WHERE channel_id = '4' AND status = 'open' GROUP BY author ORDER BY entry_id DESC LIMIT 10"; $...


3

No, even though we use the same hooks as the Pages module EE has no parameter for that. Here are all of the available parameters for the channel tag: http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#parameters


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

Safecracker used to be answer to this but now it is deprecated and replaced with "Expression Channel Form". Have a look at this. Hope this helps. http://ellislab.com/expressionengine/user-guide/modules/channel/channel_form/index.html#logged-out-member-id


3

You might see this article http://www.sidd3.com/get-entry-revisions-in-expressionengine/. I hope, it would help you.


3

This SQL will clean up both exp_channel_titles and exp_channel_data: DELETE exp_channel_titles, exp_channel_data FROM exp_channel_titles INNER JOIN exp_channel_data ON exp_channel_data.entry_id = exp_channel_titles.entry_id WHERE exp_channel_titles.channel_id = 5 AND exp_channel_titles.status = 'your_custom_status' Replace the channel_id and status as ...


3

switch can help in this case: <div class="item-container active"> {exp:channel:entries channel="yourchannel"} <img src=".." /> {if count != total_results} {switch='|||||||</div><div class="item-container">'} {/if} {/exp:channel:entries} </div>


3

Try appending this &perpage=1000


3

I'm pretty sure you can just pass in the fieldname the row and column like $data['field_id_X'][rows][new_row_1][col_id_1] = 'row 1'; $data['field_id_X'][rows][new_row_2][col_id_1] = 'row 2'; Just increment new_row_x as needed and match up your col_id_x numbers


3

Yep it is still there. Go to Developer/Channels and edit a channel (or create a new one) - the Maximum number of entries value is the third setting field down on the "Channel" tab (i.e. the first one that appears when you edit a channel). More in the EE documentation. HTH


2

Did you try by passing the parameter author_id="CURRENT_USER"


2

This sounds like something that Low Yearly Archive could be used for. http://gotolow.com/addons/low-yearly-archive


2

Yes there is! Andrew Weaver's Purgedata plugin will do exactly this. Plugin page on brandnewbox Download EE 2.x version from Bitbucket From his website: Delete content from selected weblogs that is older than a specified time Ideal to accompany FeedGrab, CSVGrab and XMLGrab. It works by adding the plugin's tag to an EE template and visiting the ...


2

I've done that sort of thing using a status and limiting the items displayed on the home page to just those with that status. And you can, as of 2.5.4, order by status, putting them up first if you so choose, mirroring sticky functionality, on your inside page.


2

Disclosure: This is probably insane. That said, here's what I did to "solve" the problem utilizing P&T's Iterate plugin and Stash: <ul class="item-list-nav"> {exp:iterate alpha='a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z' parse='inward'} <li class="ig-{alpha}"><a href="#ig-{alpha}">{alpha}</a></li> {/...


2

Using SQL to remove entries means you also have to do extra clean up on relationship tables and categories. You can bypass the input limits by appending the appropriate query string parameters to the address of the edit screen. For example, go to Publis > Edit > Your Channel. Then append the following to the url: &perpage=5&status=closed You ...


2

I haven't tested this (it's a bit tricky to setup!) but try promoting your Stash tags to the top level of the nesting hierarchy like this... Also with exp:stash:parse you should omit the exp part when you get variables (I think you can get away without parse="inward" with this method too). {exp:stash:set name="groups" trim="yes" parse_tags="yes"} {exp:...


2

Check your permissions within the status group. Each group that is creating/editing content needs to have permission to each status. So, if the open status is only available to Super Admins and your account isn't a Super Admin, then it won't show Open as an option for you.


2

There are a variety of approaches to this. One tool that always proves useful when trying to serve a wide range of layouts and content from a single template is Switchee. This will usually cover all the bases for you! Plus it's more efficient and flexible than native conditionals. Other approaches to play with (either in conjunction with Switchee or ...


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