Events Made Easy › Forums › How do I … › #_ATTribute in Location
Tagged: attribute
- This topic has 14 replies, 3 voices, and was last updated 5 years, 11 months ago by Anonymous.
-
AuthorPosts
-
Thu 19 Feb 2015 at 12:05 #53517AnonymousInactive
Single event show format is like see picture.
The attribute ‘Web’ is set in location, see picture.
The result in event display shoud be an URL pointing to value of ‘Web’. But it does not point there but to the event itself,
see picture.
What is wrong? Or what is the right way to achieve this?
Thank you.Thu 19 Feb 2015 at 13:33 #53519FrankyKeymasterBecause the #_ATT{Web} is an attribute for an event, not for a location, meaning that you need to define it when creating an event, not a location.
Although in your case: why not just use #_LOCATION in your single event format, and point the linked location to the external url?Thu 19 Feb 2015 at 17:00 #53525AnonymousInactiveFranky: “why not just use…” – let me try to explain:
1. When displaying event details I add some basic details about location – i.e. Address, Town, some short Description and Directions. This data tells the user how to get there.
2. On other place of my web I supply list of locations. Click on an list entry shows the same data as above <b>plus list of all events for that location</b> (both past and future) by means of ‘[events_list scope=all limit=0 location_id=this_location]‘.
Only when the user wants to see more about location he can go to the location’s website. And this was the field #_ATT{Web} which I wanted to use as location’s website url.
That’s it. In other words it would be useful if in location settings was another placeholder called e.g. #_LOCATION_WEBSITE.
BTW, I am using your plugin for about 4 years to my satisfaction. The events are golf tournaments, the locations are golf courses. I keep nearly seven hundreds of events and more than 1 hundred of locations and these figures are growing.
JosefThu 19 Feb 2015 at 17:34 #53527FrankyKeymasterWell ok, but my explanation stands 🙂
In your case: you refer to an attribute for a location in the single event format: the event doesn’t know #_ATT{Web} belongs to a location, so it tries to find it’s own value for it (which is empty): empty link results in same page …
So, for now: you need to define the location website when creating the event by adding the attribute value there, if you really want them to directly jump to an external site.
The extra placeholder for the location is useless: #_LOCATION already points to the external url if you fill that in when creating the location, but of course then you can’t show the location details, since clicking on a location list will forward you to the external site.I’ll add a placeholder #_MYLOCATIONATT{xx} to get the relevant location att inside the event, that will make things easier in the next version 🙂
See this change: https://plugins.trac.wordpress.org/changeset/1094471/Thu 19 Feb 2015 at 17:36 #53528FrankyKeymasterBtw: if you like EME, please post a link in the Showcase forum, so everybody can take a look at your work!
Thu 19 Feb 2015 at 18:29 #53531AnonymousInactiveThank you, I understand your explanation. As to
So, for now: you need to define…
this is tedious as there might be many events at one location.
Now I am trying to understand the proposed #_MYLOCATIONATT{xx}: does it mean that if one defines an attribute in location, say ‘Web’ with some value, then #_MYLOCATIONATT{Web} pulls the Web’s value into event?
As to Show case, I will post the link to my website there. The weak point is that it is in Czech language which is spoken by about 0.14 % of overall population.Thu 19 Feb 2015 at 19:20 #53532FrankyKeymasterConcernong the new placeholder; yes, that will be the case.
Thu 19 Feb 2015 at 19:32 #53534AnonymousInactiveThank you, this sounds good, looking forward.
Thu 19 Feb 2015 at 22:46 #53540AnonymousInactiveFranky, I have good news!
I’ll add a placeholder #_MYLOCATIONATT{xx} to get the relevant location att inside the event, that will make things easier in the next version 🙂
See this change: https://plugins.trac.wordpress.org/changeset/1094471/I tested (on a local website) the solution you proposed applying the code change to events-manager.php and can tell you that IT WORKS SUPERBLY!!! In location I declare #_ATTribute ‘Web’ value of which is URL of location and on event page I define
<a href="#_MYLOCATIONATT{Web}">location website</a>
Thank you very much.Thu 10 Jan 2019 at 05:23 #59389AnonymousInactiveHi Franky,
I see you referenced #_LOCATION here, but it is not listed under the Event Placeholders in the relevant doc page at https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-2-events/. Please add it for future users 🙂
Thu 10 Jan 2019 at 07:15 #59392FrankyKeymasterSee the doc on event placeholders:
Location placeholders
Every location placeholder can be used inside an event as well, see the doc for location placeholders.
If you have enabled the Google Map integration, you can use #_MAP to display a map. It is also possible to use #_MAP in the events list page.Thu 10 Jan 2019 at 17:58 #59398AnonymousInactiveLol I can’t believe I missed that!
You might want to add a link at that spot in the Event Placeholders doc. 🙂
Thu 10 Jan 2019 at 17:59 #59399AnonymousInactiveActually, #_LOCATION isn’t listed on the Location Placeholders page either. I suppose it’s the same as #_LOCATIONNAME? That’s how it worked for me.
Thu 10 Jan 2019 at 20:14 #59402FrankyKeymasterThis is a post from 2015, #_LOCATION might have been correct at that time but the doc is the correct place to look for placeholders.
Thu 10 Jan 2019 at 20:46 #59404AnonymousInactiveThanks Franky 🙂
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.