highlight entry
Permalink Browser Info Environment
Is it possible to use custom attributes to assign a pro blog entry as
'highlighted' or 'sticky' so when we show a list of blog entries (previews in a sidebar) the blog entries which are highlighted are first in the list?
'highlighted' or 'sticky' so when we show a list of blog entries (previews in a sidebar) the blog entries which are highlighted are first in the list?
Type: | Discussion |
---|---|
Status: | New |
Then, in whatever view you're using, find the page object type var. In list views, this is typically $cobj. In the content block this is normally $c.
you can then call the attribute by it's handle from that object like so:
or you can then also filter by a var by adding the following just above where the loop starts in the list view. You will need to take the page list object before it's looped, add a filter, to then re-get the pages and redefine the list of pages. the filter should look for "ak_"+ your attribute handle. Typically, the pre looped "container" of page objects is called "$cArray" . You can do this in the view just above the $cArray loop like so:
Now the loop will only display your sticky posts.
In general, this is how to do this with any attribute. However, select attribute types need to filter differently like so:
ChadStrat