How do I assing a different URL to an object called child_link.url? It already has a URL assigned through the navigation menu but I want to hijack it and assign a different URL.
Where ever the linklist is being loop over where the child_link.url gets output you’d have to insert a condition that outputs something else or reassigns a custom variable.
{%- assign child_url == child.url -%}
{%- if child.url == "somelink.com" or child.url contains "somelink" -%}
{%- assign child_url == "someOTHERlink.com" -%}
{%- endif -%}
{%- comment -%}text{%-endcomment-%}
text
In the above example the system property child**.url** is replace with a custom variable child**url** that is assigned a custom value if child.url contains some value or is an exact match to some value. The underscore in child****url is arbitrary and just used to indicate some sort of context that the variable is coming from a property(url) on an object(child); it could just as easily be childURL.
If you need this customization setup you contact me by mail for services.
Please always provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.
Good Hunting.