Good day,
could somebody please help me how to adjust this formula and to make url to be dynamic, not hardcoded?
HYPERLINK("https://bginc--devyopo2.lightning.force.com/" & Id, bgi_Quote_Name__c)
To make your url dynamic used the template strings.
example:
https://www.mywebsite.com/products/${id}
The id here will render different product id in a new page
This is what worked for me
HYPERLINK(LEFT($Api.Partner_Server_URL_530, FIND( '/services', $Api.Partner_Server_URL_530))&'/'& Id,bgi_Quote_Name__c)
Related
At the moment I'm calling taxonomy term data using URL's like this -
http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area]=northwest
Is there a way I can call two taxonomy terms at the same time, something like this? -
http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area]=northwest&filter[listing_area]=northeast
I've read through all documentation but I'm struggling to find a solution, andy help would be much appreciated, thanks in advance!
Without knowing the full code in place its hard to be 100% but try...
http://scd.blaze.wpengine.com/wp-json/posts?type=listings&filter[listing_area][]=northwest&filter[listing_area][]=northeast
By adding [ ] to the end of each reference to listing_area you are now passing through an array of values. Otherwise you just pass through the last value in the query string.
I need to edit a template's header.php file and I want to check if it has a taxonomy named "store". If so, then I need to extract it's tag_ID.
When I edit the page (it's not a WordPress Page type) I can see these values in the admin url:
taxonomy=store&tag_ID=720
So I know there is a way but I'm having trouble getting any good results. I tried the
method detailed here to extract at least the tag_ID but I'm getting NULL:
$tag_id=get_query_var('tag_ID');
echo $tag_id; //NULL
Edit:
To be clear in regards to the tag_ID because it may be confusing, all I really want is to get the unique id of the requested page so I figure seeing first if it has a taxonomy named "store" and then getting the right one using the tag_id.
AS far as i understand your question, You should try this:-
$data = get_queried_object();
With this, you can get what page/post/taxonomy is being called.
Just print-out/var_dump this $data variable, you will get full object of page/post/taxonomy.
Hope this may help you.
I have a question. I'm creating a view file for product listing which have filter function. For example, My current Url is
mysite/category/electronics?p=1
And in my template I have a tag to add a some filter criteria. When click on a, I want my uri will be mysite/category/electronics?p=1&c=2 for example.
But I don't know what's the best practice to generate href for a tag, by current uri(app.request.uri) or generate uri from route (use path())..... Waiting for help!
Let's say you are on the route name product_show I'd say you should use path()
path("product_show", { p : 1, c : 2, i : "another_parameter"})
PS: If you have a large amount of parameters your should use url_encode to make it more readable.
Ref: http://twig.sensiolabs.org/doc/filters/url_encode.html#url-encode
And finally and good to know. app.request.query.all will give you all current query parameters in your current url.
i want to achieve few redirection like
when user will type this www.mysite.com/label/uk or www.mysite.com/label.aspx/uk then my labeluk.aspx will load or
when user will type this www.mysite.com/label/us or www.mysite.com/label.aspx/us then my labelus.aspx will load or
when user will type this www.mysite.com/label/fr or www.mysite.com/label.aspx/fr then my labelfr.aspx will load.
so please tell me how do i define pattern for routing like
RouteTable.Routes.MapPageRoute("Source1", "label/{ID}", "~/labeluk.aspx");
RouteTable.Routes.MapPageRoute("Source1", "label/{ID}", "~/labelus.aspx");
i am not being able to figure out how to achieve it by routing. please help me to form the maproute. thanks
You can look into URL Rewriting on the web or SEO Urls
http://www.codeproject.com/KB/aspnet/URL-Rewriting-in-ASPNET.aspx
you could do something like this..
keep one route (in Global) as
RouteTable.Routes.MapPageRoute("Source", "label/{ID}, "~/label.aspx");
so all will resolve /label.aspx, then on label.aspx check ID param e.g.
Page.RouteData.Values.ContainsKey("ID")
and depending on whether it's uk, fr or us do
HttpContext.Current.RewritePath("/labeluk.aspx", false);
alternatively not even need to have /label.aspx just check ID param in Global and do RewritePath there
I just think about that, easy to do in non cms site, but in wordpress site... i like to know YOUR approach to that problem
I have a BIG site (200 pages)... and at a lot of place, the info#something.com, the 000-000-0000 telephone and send your check to 123 easy street, Canada...
all that email, telephone, and address... should reside in one place (a post or a var) and when you need to insert it you should used the short code [tel] or [email].... but how...
is there a plusgin that can define var, or a tutorial to do that... do you only have to change it ONE for the whole site..
Any idea is welcome.... now, find and remplace is my friend !...
thanks in advance
You could try the Custom Config plugin:
http://wordpress.org/extend/plugins/custom-configs/
It will allow you to create custom global variables that are contained within the CMS (otherwise you'd be declaring these variables within the template config).
Usage to output a variable onto the page would be something like:
<?=get_config('myVariable','default')?>