1

I have node golosuizaprognoz_lenta with hidden field argument-lenta, node golosuizaprognoz with field field_argument, view of table with Rating wiget:

enter image description here

The node have title with date, for example 21/06/14 Голосуй за прогноз!!!

I need that in node was view only with date equal date in title.

What I have done:

I add to node golosuizaprognoz_lenta hidden field argument-lenta where I add url of result node, for example 210614-golosuy-za-prognoz.

I make EVA display:

enter image description here

with contextual filter:

enter image description here

enter image description here

when I insert content of field field_argument wich equal of url node golosuizaprognoz_lenta , for example enter image description here all OK, I get what I want, but in node I have no this view (without contectual filters view is shown so I attached it).

How I need to fit contextual filters that in node I will see only views with content wich have field field_argument wich equal of url node golosuizaprognoz_lenta.

http://myforecast.esy.es/210614-golosuy-za-prognoz/

enter image description here

8
  • are you saying the contextual filter itself does not work, or are you trying to get the url of the content to include the date (example.com/210614-golosuy-za-prognoz)
    – Geoff
    Commented Jul 12, 2014 at 17:52
  • i say the contextual filter itself does not work. Commented Jul 14, 2014 at 0:54
  • but it works in Views, with a contextual filter defined?
    – Geoff
    Commented Jul 14, 2014 at 1:36
  • yes, Geoff, in view's preview all is OK. temporarly I have resolved this issue - choosed php in contextual filters and insert return array_pop(explode('/',drupal_get_path_alias()));. All work perfectly, but may be exists more elegant decision? Commented Jul 14, 2014 at 5:47
  • the only other way I can think of would be to separate the content into a sub-folder as part of it's url (i.e. example.com/golosuy-za-prognoz/210614, example.com/golosuy-za-prognoz/120214, etc). This should be accessible directly
    – Geoff
    Commented Jul 14, 2014 at 13:02

1 Answer 1

0

You should be able to accomplish this by using Auto Node Title . This will generate automatic node titles, and allows PHP to define that title. Using str_replace you can remove the slashes from a date field and replacing them with nothing, creating the desired effect. Then use a token or static text in the title for the rest of it

"auto_nodetitle" is a small and efficient module that allows hiding of the content title field in the form. To prevent empty content title fields one can configure it to generate the title by a given pattern.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.